{"slug": "stop-copy-pasting-boilerplate-scaffold-projects-snippets-fast-with-bscaff", "title": "Stop Copy-Pasting Boilerplate: Scaffold Projects & Snippets Fast with BScaff", "summary": "A developer released BScaff, an open-source command-line tool that stores and scaffolds reusable developer resources as locally saved \"snapshots\" under ~/.bscaff. The tool can capture directory trees, Git repositories, snippets, templates and URLs, parse ASCII directory diagrams copied from AI coding assistants into real folder structures, and resolve Mustache-style {{ variable }} placeholders across file paths and contents. It is distributed via npm as @akashnag/bscaff.", "body_md": "How many times have you started a new feature or microservice, only to spend the first 20 minutes copy-pasting `.eslintrc`, `tsconfig.json`, Dockerfiles, and boilerplate directory structures from an older project?\n\nOr worse—you find an awesome directory structure generated by Claude or ChatGPT, and you sit there manually `mkdir`-ing and `touch`-ing every single file?\n\nWe've all been there:\n\nThere has to be a better way to capture, store, and recreate developer resources without leaving the terminal.\n\nEnter **BScaff**.\n\n**BScaff** is a light, lightning-fast CLI tool designed to store, manage, and scaffold reusable developer resources. Think of it as a personal, command-line vault for:\n\n`tree`)` files`)` snippet`)` template`)` url`)\nEverything in BScaff revolves around a **snapshot**—a uniquely named key (`-k`) storing your saved content locally under `~/.bscaff`.\n\nGetting started takes seconds. Install BScaff globally via `npm`:\n\n```\nnpm install -g @akashnag/bscaff\n```\n\nVerify the installation:\n\n```\nbscaff --version\n```\n\nLet's dive into three everyday workflows where BScaff instantly saves you time.\n\nSay you have a starter React or Node.js template configured just the way you like it. Instead of creating a GitHub template repository or manually zip-copying folders, save it as a directory snapshot:\n\n```\n# Save your base project as a snapshot named 'node-base'\nbscaff -k node-base --desc \"Base Node.js Express setup\" --tags node,express save tree ~/projects/my-node-starter\n```\n\nWhen you are ready to start a new service, extract it anywhere:\n\n```\n# Extract the snapshot into a new folder\nbscaff -k node-base extract ./my-new-api\n```\n\nBoom! Your full directory structure and file contents are instantly created.\n\nAI coding assistants are great at generating project structures like this:\n\n```\nmy-service/\n├── src/\n│   ├── controllers/\n│   │   └── user.controller.ts\n│   ├── routes/\n│   │   └── user.routes.ts\n│   └── index.ts\n├── tests/\n│   └── user.test.ts\n└── package.json\n```\n\nInstead of manually creating these folders and files, **copy that ASCII diagram directly to your clipboard** and run:\n\n```\nbscaff create tree ./my-service --prompt-for-content\n```\n\nBScaff parses the tree diagram directly from your clipboard, constructs the complete directory hierarchy on disk, and interactively prompts you to supply content for each generated file.\n\nNeed dynamic placeholders in your files? BScaff supports **Mustache variable templates** (`{{ variable }}`).\n\nSuppose you have a component template containing:\n\n``` js\n// {{ componentName }}.tsx\nexport const {{ componentName }} = () => {\n    return <div>Hello from {{ componentName }}</div>;\n};\n```\n\nWhen extracting or generating from this snapshot, BScaff will automatically detect `{{ componentName }}`, prompt you for its value, and replace it across file paths and file contents seamlessly!\n\nHere is a quick command reference to keep in your back pocket:\n\n| Action | Command Syntax | \n|---|---|\n| **Save Directory Tree** | `bscaff -k <key> save tree <path>` | \n| **Save Git Repo** | `bscaff -k <key> save tree <repo-url> --git` | \n| **Save Snippet from File** | `bscaff -k <key> save snippet <file-path>` | \n| **Save Clipboard Snippet** | `bscaff -k <key> save snippet --memory --type ts` | \n| **Extract Snapshot** | `bscaff -k <key> extract <dest-path>` | \n| **Dry Run Extraction** | `bscaff -k <key> extract <dest-path> --dry-run` | \n| **List Saved Snapshots** | `bscaff list` | \n| **Search Snapshots** | `bscaff search --tags react` | \n| **Copy Snippet to Clipboard** | `bscaff -k <key> copy` | \n| **Delete Snapshot** | `bscaff -k <key> delete` | \n\nBScaff isn't *just* for project scaffolding—it has a few unexpected capabilities that can streamline your daily workflow.\n\nStop cluttering your browser bookmark bar with docs you only use during development. Save URLs straight in BScaff:\n\n```\n# Bookmark official documentation or dashboards\nbscaff -k go-docs save url https://go.dev/doc/\n```\n\nWhenever you need to jump back in, run:\n\n```\n# Automatically launches the URL in your default browser\nbscaff -k go-docs open\n```\n\nYou can use BScaff as a persistent, zero-friction markdown scratchpad:\n\n```\n# Create a blank markdown note snapshot\nbscaff -k sprint-notes save snippet --type md\n```\n\nWhenever you want to view or edit your notes, use the `update content` or `open` commands:\n\n```\n# Edit your markdown notes directly in your configured terminal text editor\nbscaff -k sprint-notes update content\n```\n\nBScaff was built to eradicate repetitive setup tasks so you can focus on writing actual code.\n\nGive it a try on your next project:\n\nIf you find it helpful, drop a star on GitHub, share it with your team, and happy scaffolding! 🚀", "url": "https://wpnews.pro/news/stop-copy-pasting-boilerplate-scaffold-projects-snippets-fast-with-bscaff", "canonical_source": "https://dev.to/akashnagcs/stop-copy-pasting-boilerplate-scaffold-projects-snippets-fast-with-bscaff-501h", "published_at": "2026-10-15 06:29:00+00:00", "updated_at": "2026-10-15 06:44:06.125001+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["BScaff", "npm", "Claude", "ChatGPT", "@akashnag/bscaff"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/stop-copy-pasting-boilerplate-scaffold-projects-snippets-fast-with-bscaff", "markdown": "https://wpnews.pro/news/stop-copy-pasting-boilerplate-scaffold-projects-snippets-fast-with-bscaff.md", "text": "https://wpnews.pro/news/stop-copy-pasting-boilerplate-scaffold-projects-snippets-fast-with-bscaff.txt", "jsonld": "https://wpnews.pro/news/stop-copy-pasting-boilerplate-scaffold-projects-snippets-fast-with-bscaff.jsonld"}}