
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
create-defuss
Advanced tools
Checks out git projects from sub-directories. Originally for jump-starting defuss projects from templates.
defuss
Project Scaffolder
create-defuss
is a simple, lightweight CLI tool and Node.js library that enables Git sparse checkouts for subdirectories of GitHub repositories. Originally created to help jump-start projects using defuss templates, it can be used for any Git repository.
💡 Did you know? With just one command, you can checkout a specific subdirectory from a GitHub repository without cloning the entire project.
🚀 Getting Started
You're just one step away from checking out one of defuss
simple example projects:
defuss
+ Astro
project:[‼️] Make sure
git
is installed on your computer!
npx create-defuss https://github.com/kyr0/defuss/tree/main/examples/with-astro-ts
This will download only the code from the with-astro-ts
subdirectory into the (new) folder local folder.
defuss
+ Vite
project:[‼️] Make sure
git
is installed on your computer!
npx create-defuss https://github.com/kyr0/defuss/tree/main/examples/with-vite-ts
This will download only the code from the with-vite-ts
subdirectory into the (new) folder local folder.
npx create-defuss https://github.com/kyr0/defuss/tree/main/examples/with-vite-ts ./my-custom-defuss-project
This will download only the code from the with-vite-ts
subdirectory into the (new) folder local folder my-custom-defuss-project
.
⚙️ API usage
You can also use create-defuss
as library. It's super simple:
import { performSparseCheckout } from "create-defuss"
// pass in the Git url and desired destination folder (relative to the current working directory)
performSparseCheckout("git_url", "dest_folder")
🚀 How does defuss-vite
work?
create-defuss
is an NPM package with a bin
entry in package.json
. This, combined with a "shebang" line (#!/someshell
) makes it executable using npx
as a CLI (command line interface). It uses Git sparse checkout to efficiently download files from a specific subdirectory of a GitHub repository. It avoids downloading the entire repository, saving bandwidth and time. Also, monorepo maintainers can spare on creating extra "template" repositories for their example code.
Inside the project, you'll find the following relevant files:
/
├── src/cli.ts
├── src/git.ts
├── package.json
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm build | Build a new version of the plugin. |
npm publish | Publish a new version of the defuss-vite integration package. |
FAQs
Checks out git projects from sub-directories. Originally for jump-starting defuss projects from templates.
The npm package create-defuss receives a total of 33 weekly downloads. As such, create-defuss popularity was classified as not popular.
We found that create-defuss 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.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.