
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
π¦ Snapshot, backup, and restore any project β binary-safe, fast, and simple CLI.
π Full Documentation β https://snapcube.netlify.app
Clone and recreate complete project structures in seconds! π
Snapcube is a lightweight CLI tool that snapshots your project's entire directory tree (including or excluding file contents) into a single JSON file β and recreates it anywhere instantly. Perfect for templates, backups, AI-assisted reviews, and team sharing.
--token)node_modules.snapcube.json is invalid before creationnpm install -g snapcube
Then use it anywhere:
snapcube clone ./my-project
npx)If you don't want to install globally, you can run Snapcube directly:
npx snapcube clone ./my-project
π‘ Notes for npx usage:
npx downloads the package temporarily.command not found, try again β sometimes the first run only fetches dependencies.Example workflow with npx:
# Clone a project structure without binary contents
npx snapcube clone ./my-project --ignore-binaries
# Restore it later
npx snapcube create my-project.snapcube.json
snapcube clone <directory-path>
Example:
snapcube clone ./my-awesome-project
This will generate:
my-awesome-project.snapcube.json
snapcube clone-repo github:<username/repo>@<branch>
Examples:
# Clone Snapcube repo itself (main branch)
snapcube clone-repo github:tanmayvaij/snapcube@main
# Clone without binary file contents
snapcube clone-repo github:tanmayvaij/artistly@main --ignore-binaries
# Clone only structure (no file contents)
snapcube clone-repo github:tanmayvaij/artistly@main --ignore-all
π Generates {username}_{repo-name}.snapcube.json.
snapcube clone-repo gitlab:<username/repo>@<branch>
Examples:
# Clone a GitLab repo
snapcube clone-repo gitlab:username/my-project@main
# Clone with authentication token
snapcube clone-repo gitlab:username/private-project@main --token <your_gitlab_token>
Private repositories require authentication with a Personal Access Token.
snapcube clone-repo github:username/private-repo@main --token <your_github_token>
snapcube clone-repo gitlab:username/private-repo@main --token <your_gitlab_token>
Examples:
# Clone a private GitHub repo fully
snapcube clone-repo github:myorg/secret-project@main --token ghp_xxx123abc
# Clone private GitLab repo but skip binary files
snapcube clone-repo gitlab:myorg/secret-project@main --ignore-binaries --token glpat_xxx123abc
β οΈ If you try cloning a private repo without --token, Snapcube will throw an error.
π How to generate tokens:
GitHub:
repo (to access private repos)GitLab:
read_repository scopesnapcube create <json-file>
Example:
snapcube create my-awesome-project.snapcube.json
The project will be recreated inside a folder named after the original project.
If you only want the directory tree (without file contents, sizes, encodings, etc.), use --structure-only.
snapcube clone ./my-project --structure-only
Example Output:
[
"my-project/package.json",
"my-project/src/index.js",
"my-project/src/App.jsx",
"my-project/public/index.html"
]
This is extremely useful for AI/LLM project understanding, lightweight snapshots, or tech stack analysis.
| Command / Option | Description | Example |
|---|---|---|
clone | Save local project structure to JSON | snapcube clone ./my-project |
clone-repo | Save structure of a remote repo to JSON | snapcube clone-repo github:user/repo@main |
create | Restore project from JSON | snapcube create my-project.snapcube.json |
--ignore-binaries | Ignore content of binary files (images, PDFs, videos, etc.) | snapcube clone ./my-project --ignore-binaries |
--ignore-all | Ignore content of all files β only structure & metadata saved | snapcube clone ./my-project --ignore-all |
--structure-only | Save only the file paths (no metadata/contents) | snapcube clone ./my-project --structure-only |
--token <token> | Provide authentication token for private repos | snapcube clone-repo github:user/private@main --token xxx |
--help | Show help information | snapcube --help |
--version | Show version number | snapcube --version |
π‘ Tip: If both --ignore-all and --ignore-binaries are provided, --ignore-all takes priority.
π‘ Note: --structure-only overrides everything else and just outputs an array of file paths.
Example output:
[
{
"fileName": "package.json",
"filePath": "my-awesome-project",
"content": "{\n \"name\": \"my-project\"...\n}",
"isBinary": false,
"encoding": "utf-8"
},
{
"fileName": "logo.png",
"filePath": "my-awesome-project/assets",
"content": null,
"isBinary": true,
"encoding": "base64"
}
]
π Structure-only mode simplifies this to just file paths:
[
"my-awesome-project/package.json",
"my-awesome-project/assets/logo.png"
]
.snapcube.json for AI-assisted debugging--structure-only to let AI quickly identify frameworks, languages, and project setupnode_modules, .git, etc.).snapcube.json file.snapcube.json formatnode_modules/.git/ and hidden directories.next/, dist/, out/, and build output folders__pycache__/, venv/, vender/.DS_Store, thumbs.db, and cache directoriesgit checkout -b feature/AmazingFeaturegit commit -m "Add some AmazingFeature"git push origin feature/AmazingFeatureβ If you like Snapcube, star the repo to support development!
Made with π by Tanmay Vaij
FAQs
π¦ Snapshot, backup, and restore any project β binary-safe, fast, and simple CLI.
The npm package snapcube receives a total of 1 weekly downloads. As such, snapcube popularity was classified as not popular.
We found that snapcube demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.