{"id":19442,"library":"destiny","title":"Destiny","description":"Destiny v0.7.1 is a CLI tool that reorganizes JavaScript/TypeScript project file structures into a fractal pattern based on import dependencies. It scans files, builds a directed graph of imports, and restructures folders while fixing import paths. Last released in August 2020, the project appears stable but has no recent activity. It differentiates from other file organizing tools by using actual code dependency analysis rather than naming conventions, though the author notes the approach may be limited.","status":"maintenance","version":"0.7.1","language":"javascript","source_language":"en","source_url":"https://github.com/benawad/destiny","tags":["javascript","auto","fractal","cli","file","prettier","structure"],"install":[{"cmd":"npm install destiny","lang":"bash","label":"npm"},{"cmd":"yarn add destiny","lang":"bash","label":"yarn"},{"cmd":"pnpm add destiny","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"CLI argument parsing","package":"commander","optional":false},{"reason":"File glob pattern matching","package":"glob","optional":false}],"imports":[{"note":"Destiny is a CLI tool, typically run via npx or global install.","wrong":"","symbol":"destiny","correct":"npx destiny \"src/**/*.*\""},{"note":"Package is ESM? Not confirmed; may require import syntax.","wrong":"const destiny = require('destiny');","symbol":"destiny (programmatic API)","correct":"import destiny from 'destiny';"},{"note":"Use -w flag to actually restructure files; otherwise it's a dry run.","wrong":"","symbol":"destiny (write mode)","correct":"npx destiny -w \"src/**/*.*\""}],"quickstart":{"code":"// Install globally or use npx\nnpx destiny --version\n\n// Dry run to preview restructuring\nnpx destiny \"src/**/*.ts\"\n\n// Actually restructure files\nnpx destiny -w \"src/**/*.ts\"\n\n// Avoid single-file folders\nnpx destiny -S -w \"src/**/*.ts\"\n\n// Help\nnpx destiny --help\n","lang":"javascript","description":"Shows how to install and run destiny for dry run and actual restructuring with common options."},"warnings":[{"fix":"Ensure project is JS/TS before running.","message":"Only works on JavaScript/TypeScript codebases; other languages not supported.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Update snapshot tests after running destiny.","message":"Snapshot tests may not format correctly after restructuring.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use version control before running.","message":"Always commit to git or back up before running with -w flag; bugs may occur.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use npx destiny or install globally: npm i -g destiny","cause":"Missing dependency when running directly via node instead of npx.","error":"Error: Cannot find module 'commander'"},{"fix":"Run using npx destiny or install globally with npm i -g destiny","cause":"Package not installed globally.","error":"destiny: command not found"},{"fix":"Adjust the glob pattern, e.g., 'src/**/*.{ts,js,tsx,jsx}'","cause":"Glob pattern does not match any files.","error":"No files matched the pattern"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}