git0 0.2.12 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +27780 -0
- package/dist/cli.js.map +331 -0
- package/docs/404.html +2 -2
- package/docs/Footer/index.html +2 -2
- package/docs/assets/js/1df93b7f.1385eba0.js +2 -0
- package/docs/assets/js/22dd74f7.e13ac7a4.js +1 -0
- package/docs/assets/js/28ab763d.192aa3bb.js +1 -0
- package/docs/assets/js/299d276b.c9496717.js +1 -0
- package/docs/assets/js/{68cef36b.c312447e.js → 68cef36b.e5b1975b.js} +1 -1
- package/docs/assets/js/a9cef9d5.a7253e41.js +1 -0
- package/docs/assets/js/c3a618e1.1c56fb03.js +590 -0
- package/docs/assets/js/{main.cf858a7d.js → main.1f646b09.js} +2 -2
- package/docs/assets/js/runtime~main.f69f8f44.js +1 -0
- package/docs/functions/fm/index.html +26 -0
- package/docs/functions/git0/index.html +6 -6
- package/docs/functions/github-api/index.html +20 -20
- package/docs/functions/index.html +889 -71
- package/docs/functions/modules/index.html +4 -3
- package/docs/index.html +2 -2
- package/docs/lunr-index-1749760982052.json +1 -0
- package/docs/lunr-index.json +1 -1
- package/docs/search-doc-1749760982052.json +1 -0
- package/docs/search-doc.json +1 -1
- package/docs/sitemap.xml +1 -1
- package/docs-config/.docusaurus/client-manifest.json +36 -24
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/p/index-466.json +1 -1
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-fm-md-a9c.json +19 -0
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-git-0-md-299.json +4 -0
- package/docs-config/.docusaurus/docusaurus-plugin-content-docs/default/site-src-functions-index-md-c3a.json +1 -1
- package/docs-config/.docusaurus/globalData.json +10 -5
- package/docs-config/.docusaurus/registry.js +1 -0
- package/docs-config/.docusaurus/routes.js +9 -3
- package/docs-config/.docusaurus/routesChunkNames.json +7 -3
- package/docs-config/src/functions/fm.md +1 -0
- package/docs-config/src/functions/git0.md +2 -2
- package/docs-config/src/functions/github-api.md +34 -17
- package/docs-config/src/functions/index.md +19 -30
- package/docs-config/src/functions/modules.md +1 -0
- package/docs-config/src/functions/typedoc-sidebar.cjs +5 -0
- package/docs-config/src/pages/index.tsx +2 -3
- package/package.json +20 -10
- package/readme.md +19 -21
- package/src/cli.ts +150 -0
- package/src/download.ts +240 -0
- package/src/fm.js +5 -5
- package/src/github-api.ts +237 -0
- package/src/ide.ts +141 -0
- package/src/install.ts +147 -0
- package/src/package-menu.ts +183 -0
- package/src/platform.ts +53 -0
- package/src/releases.ts +159 -0
- package/src/setup.ts +9 -0
- package/src/types.ts +97 -0
- package/src/utils.ts +49 -0
- package/test/download.test.ts +48 -0
- package/test/github-api.test.ts +79 -0
- package/test/package-menu.test.ts +134 -0
- package/test/platform.test.ts +64 -0
- package/test/releases.test.ts +169 -0
- package/docs/assets/js/1df93b7f.d8c05d2c.js +0 -2
- package/docs/assets/js/22dd74f7.237398b4.js +0 -1
- package/docs/assets/js/28ab763d.5714aa16.js +0 -1
- package/docs/assets/js/299d276b.1a1baa1c.js +0 -1
- package/docs/assets/js/c3a618e1.965a31da.js +0 -1
- package/docs/assets/js/runtime~main.7520dc36.js +0 -1
- package/docs/lunr-index-1749613752315.json +0 -1
- package/docs/search-doc-1749613752315.json +0 -1
- package/src/git0.js +0 -380
- package/src/github-api.js +0 -472
- /package/docs/assets/js/{1df93b7f.d8c05d2c.js.LICENSE.txt → 1df93b7f.1385eba0.js.LICENSE.txt} +0 -0
- /package/docs/assets/js/{main.cf858a7d.js.LICENSE.txt → main.1f646b09.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"searchDocs":[{"title":"modules","type":0,"sectionRef":"#","url":"/functions/modules","content":"","keywords":"","version":"Next"},{"title":"Modules","type":1,"pageTitle":"modules","url":"/functions/modules#modules","content":" fmgit0github-api ","version":"Next","tagName":"h2"},{"title":"fm","type":0,"sectionRef":"#","url":"/functions/fm","content":"fm Documentation / fm","keywords":"","version":"Next"},{"title":"Git0: Download Git Repo on Step Zero","type":0,"sectionRef":"#","url":"/functions/","content":"","keywords":"","version":"Next"},{"title":"🚀 Installation","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-installation","content":" npm install -g git0 bun install -g git0 ","version":"Next","tagName":"h2"},{"title":"✨ Features","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-features","content":" Search GitHub repositories by name with fuzzy matchingDownload repositories directly from GitHub URLs or owner/repo shortcuts. Skip the manual git clone, cd, install danceGet Releases instantly download latest release for your system or all systemsAutomatic dependency installation and installation for multiple project typesSmart IDE integration - automatically opens projects in your preferred editorCross-platform support - works on Windows, macOS, and LinuxConflict resolution - handles directory naming conflicts automaticallyFaster than git - skips .git history and uncompresses while downloading ","version":"Next","tagName":"h2"},{"title":"🎯 Usage","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-usage","content":" # Direct download from GitHub URL ## g and git0 both work g https://github.com/facebook/react # Search for repositories by name g react starter # Download using owner/repo shorthand git0 facebook/react # Use git0 without installing, (only node needed) # (copy this line into your project's readme to help others setup) npx git0 facebook/react ","version":"Next","tagName":"h2"},{"title":"Supported Project Types","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#supported-project-types","content":" git0 automatically detects and sets up the following project types: Project Type\tDetection\tInstallationNode.js\tpackage.json\tbun install (fallback to npm install) Docker\tDockerfile, docker-compose.yml\tdocker-compose up -d or docker build Python\trequirements.txt, setup.py\tVirtual environment + pip install Rust\tCargo.toml\tcargo build Go\tgo.mod\tgo mod tidy ","version":"Next","tagName":"h3"},{"title":"Supported IDEs","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#supported-ides","content":" git0 automatically detects and opens projects in your preferred IDE: Cursor (cursor)Windsurf (windsurf)VS Code (code)Code Server (code-server)Neovim (nvim)Webstorm (webstorm) ","version":"Next","tagName":"h3"},{"title":"🔧 Configuration","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-configuration","content":" ","version":"Next","tagName":"h2"},{"title":"What Happens After Download","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#what-happens-after-download","content":" Repository is downloaded to your current directoryProject type is detected automaticallyDependencies are installed based on project typeIDE is launched automatically (if available)Development server starts (for Node.js projects) If a directory with the same name exists, git0 automatically appends a number (e.g., react-2, react-3). ","version":"Next","tagName":"h3"},{"title":"GitHub Token (Optional)","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#github-token-optional","content":" For higher API rate limits, set your GitHub token: export GITHUB_TOKEN=your_github_token_here Without a token, you're limited to 60 requests per hour. With a token, you get 5,000 requests per hour. ","version":"Next","tagName":"h3"},{"title":"git0","type":0,"sectionRef":"#","url":"/functions/git0","content":"","keywords":"","version":"Next"},{"title":"installDependencies()","type":1,"pageTitle":"git0","url":"/functions/git0#installdependencies","content":" function installDependencies(targetDir: string): Promise<void>; Defined in: src/git0.js:207 Automatically detects project type and installs dependencies Supports Node.js, Docker, Python, Rust, and Go projects ","version":"Next","tagName":"h2"},{"title":"Parameters","type":1,"pageTitle":"git0","url":"/functions/git0#parameters","content":" Parameter\tType\tDescription targetDir string Path to the project directory ","version":"Next","tagName":"h3"},{"title":"Returns","type":1,"pageTitle":"git0","url":"/functions/git0#returns","content":" Promise<void> ","version":"Next","tagName":"h3"},{"title":"Export","type":1,"pageTitle":"git0","url":"/functions/git0#export","content":" ","version":"Next","tagName":"h3"},{"title":"Async","type":1,"pageTitle":"git0","url":"/functions/git0#async","content":" ","version":"Next","tagName":"h3"},{"title":"openInIDE()","type":1,"pageTitle":"git0","url":"/functions/git0#openinide","content":" function openInIDE(targetDir: string): void; Defined in: src/git0.js:157 Opens a directory in the first available IDE/editor Also attempts to open a README or package.json file after 3 seconds ","version":"Next","tagName":"h2"},{"title":"Parameters","type":1,"pageTitle":"git0","url":"/functions/git0#parameters-1","content":" Parameter\tType\tDescription targetDir string Path to the directory to open ","version":"Next","tagName":"h3"},{"title":"Returns","type":1,"pageTitle":"git0","url":"/functions/git0#returns-1","content":" void ","version":"Next","tagName":"h3"},{"title":"Export","type":1,"pageTitle":"git0","url":"/functions/git0#export-1","content":"","version":"Next","tagName":"h3"},{"title":"github-api","type":0,"sectionRef":"#","url":"/functions/github-api","content":"","keywords":"","version":"Next"},{"title":"default","type":1,"pageTitle":"github-api","url":"/functions/github-api#default","content":" Defined in: src/github-api.js:17 GitHub API client for downloading repositories, searching, and managing releases GithubAPI ","version":"Next","tagName":"h2"},{"title":"Example","type":1,"pageTitle":"github-api","url":"/functions/github-api#example","content":" const github = new GithubAPI(); const repos = await github.searchRepositories('nodejs'); await github.downloadRepo('user/repo', './my-downloads'); ","version":"Next","tagName":"h3"},{"title":"Constructors","type":1,"pageTitle":"github-api","url":"/functions/github-api#constructors","content":" Constructor new default(options?: object): default; Defined in: src/github-api.js:36 Creates a new GithubAPI instance Parameters Parameter\tType\tDescription options? { baseURL?: string; debug?: boolean; token?: string; } Configuration options options.baseURL? string GitHub API base URL options.debug? boolean Enable debug logging options.token? string GitHub personal access token (defaults to GITHUB_TOKEN env var) Returns default Example // Use default settings with environment token // Use custom token const github = new GithubAPI({ token: 'ghp_xxxxxxxxxxxx' }); // Enable debug mode const github = new GithubAPI({ debug: true }); ","version":"Next","tagName":"h3"},{"title":"Properties","type":1,"pageTitle":"github-api","url":"/functions/github-api#properties","content":" baseURL baseURL: string; Defined in: src/github-api.js:39 callGithub() callGithub: (path: any, options?: object) => Promise<{ [key: string]: unknown; }>; Defined in: src/github-api.js:41 Parameters Parameter\tType path any options? { } Returns Promise<{ [key: string]: unknown; }> debug debug: boolean; Defined in: src/github-api.js:38 token token: string; Defined in: src/github-api.js:37 DEFAULT_RESULTS_PER_PAGE static DEFAULT_RESULTS_PER_PAGE: number = 10; Defined in: src/github-api.js:19 Constant Number of results to return per page for repository searches ","version":"Next","tagName":"h3"},{"title":"Methods","type":1,"pageTitle":"github-api","url":"/functions/github-api#methods","content":" downloadPackage() downloadPackage(packageURL: any, downloadPath: string): Promise<string>; Defined in: src/github-api.js:189 Downloads a release asset from GitHub and provides installation instructions Parameters Parameter\tType\tDescription packageURL any Download URL for the asset downloadPath string Directory to download the asset to Returns Promise<string> Path to the downloaded file Throws When download fails Example const asset = 'https://github.com/user/repo/releases/download/v1.0.0/myapp-v1.0.0-linux-x64' const downloadPath = await github.downloadPackage(asset, './downloads/myapp'); downloadRepo() downloadRepo(repo: string, targetDir?: string): Promise<string>; Defined in: src/github-api.js:70 Downloads a GitHub repository as a tarball and extracts it to a local directory Parameters Parameter\tType\tDefault value\tDescription repo string undefined Repository URL or owner/name format targetDir? string null Target directory name (defaults to repo name) Returns Promise<string> Path to the extracted repository directory Throws When repository download fails Example // Download repository to current directory const repoPath = await github.downloadRepo('https://github.com/user/repo'); // Download to specific directory const repoPath = await github.downloadRepo('user/repo', 'my-custom-dir'); getCompatibleReleases() getCompatibleReleases(owner: string, repo: string): Promise<any[]>; Defined in: src/github-api.js:310 Gets releases compatible with the current platform Parameters Parameter\tType\tDescription owner string Repository owner repo string Repository name Returns Promise<any[]> Array of compatible releases Example const compatible = await github.getCompatibleReleases('user', 'repo'); console.log(`Found ${compatible.length} compatible releases`); getCurrentPlatform() getCurrentPlatform(): any; Defined in: src/github-api.js:262 Detects the current operating system and architecture Returns any Platform information object Example const platform = github.getCurrentPlatform(); console.log(`Running on ${platform.os} ${platform.arch}`); getReleases() getReleases(owner: string, repo: string): Promise<any[]>; Defined in: src/github-api.js:296 Gets repository releases with platform categorization Parameters Parameter\tType\tDescription owner string Repository owner repo string Repository name Returns Promise<any[]> Array of categorized releases Example const releases = await github.getReleases('microsoft', 'vscode'); console.log(`Found ${releases.length} releases`); parseURL() parseURL(query: string): any; Defined in: src/github-api.js:241 Parses a GitHub URL or shorthand repository reference Parameters Parameter\tType\tDescription query string GitHub URL or owner/repo format Returns any Parsed git URL object or false if invalid Example // Parse full URL const parsed = github.parseURL('https://github.com/user/repo'); // Parse shorthand const parsed = github.parseURL('user/repo'); if (parsed) { console.log(`Owner: ${parsed.owner}, Name: ${parsed.name}`); } searchRepositories() searchRepositories(query: string, options?: object): Promise<any[]>; Defined in: src/github-api.js:131 Searches for GitHub repositories by name and enriches results with release information Parameters Parameter\tType\tDescription query string Search query for repository names options? { getReleaseInfo?: number; order?: string; perPage?: number; sort?: string; } Search options options.getReleaseInfo? number Should also check releases for each result options.order? string Sort order (asc, desc) options.perPage? number Number of results per page (defaults to DEFAULT_RESULTS_PER_PAGE) options.sort? string Sort field (stars, forks, updated) Returns Promise<any[]> Array of repository objects with release information Throws When search fails Example const repos = await github.searchRepositories('nodejs'); repos.forEach(repo => { console.log(`${repo.name}: ${repo.hasReleases ? 'Has releases' : 'No releases'}`); }); // Custom search options const repos = await github.searchRepositories('react', { perPage: 5, sort: 'updated', order: 'desc' }); ","version":"Next","tagName":"h3"}],"options":{"id":"default"}}
|
package/docs/search-doc.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"searchDocs":[{"title":"modules","type":0,"sectionRef":"#","url":"/functions/modules","content":"","keywords":"","version":"Next"},{"title":"Modules","type":1,"pageTitle":"modules","url":"/functions/modules#modules","content":" git0github-api ","version":"Next","tagName":"h2"},{"title":"git0","type":0,"sectionRef":"#","url":"/functions/git0","content":"","keywords":"","version":"Next"},{"title":"installDependencies()","type":1,"pageTitle":"git0","url":"/functions/git0#installdependencies","content":" function installDependencies(targetDir: string): Promise<void>; Defined in: src/git0.js:208 Automatically detects project type and installs dependencies Supports Node.js, Docker, Python, Rust, and Go projects ","version":"Next","tagName":"h2"},{"title":"Parameters","type":1,"pageTitle":"git0","url":"/functions/git0#parameters","content":" Parameter\tType\tDescription targetDir string Path to the project directory ","version":"Next","tagName":"h3"},{"title":"Returns","type":1,"pageTitle":"git0","url":"/functions/git0#returns","content":" Promise<void> ","version":"Next","tagName":"h3"},{"title":"Export","type":1,"pageTitle":"git0","url":"/functions/git0#export","content":" ","version":"Next","tagName":"h3"},{"title":"Async","type":1,"pageTitle":"git0","url":"/functions/git0#async","content":" ","version":"Next","tagName":"h3"},{"title":"openInIDE()","type":1,"pageTitle":"git0","url":"/functions/git0#openinide","content":" function openInIDE(targetDir: string): void; Defined in: src/git0.js:158 Opens a directory in the first available IDE/editor Also attempts to open a README or package.json file after 3 seconds ","version":"Next","tagName":"h2"},{"title":"Parameters","type":1,"pageTitle":"git0","url":"/functions/git0#parameters-1","content":" Parameter\tType\tDescription targetDir string Path to the directory to open ","version":"Next","tagName":"h3"},{"title":"Returns","type":1,"pageTitle":"git0","url":"/functions/git0#returns-1","content":" void ","version":"Next","tagName":"h3"},{"title":"Export","type":1,"pageTitle":"git0","url":"/functions/git0#export-1","content":"","version":"Next","tagName":"h3"},{"title":"Git0: Download Git Repo on Step Zero","type":0,"sectionRef":"#","url":"/functions/","content":"","keywords":"","version":"Next"},{"title":"🚀 Installation","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-installation","content":" npm install -g git0 bun install -g git0 ","version":"Next","tagName":"h2"},{"title":"✨ Features","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-features","content":" Search GitHub repositories by name with fuzzy matchingDownload repositories directly from GitHub URLs or owner/repo shortcuts. Skip the manual git clone, cd, install danceGet Releases instantly download latest release for your system or all systemsAutomatic dependency detection and installation for multiple project typesSmart IDE integration - automatically opens projects in your preferred editorCross-platform support - works on Windows, macOS, and LinuxConflict resolution - handles directory naming conflicts automatically ","version":"Next","tagName":"h2"},{"title":"🎯 Usage","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-usage","content":" # Search for repositories by name gg react starter # Direct download from GitHub URL ## gg and git0 both work gg https://github.com/facebook/react # Download using owner/repo shorthand git0 react starter ## Use git0 without installing, (only node needed) # (copy into your project's readme for quick setup) npx git0 facebook/react ","version":"Next","tagName":"h2"},{"title":"Supported Project Types","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#supported-project-types","content":" git0 automatically detects and sets up the following project types: Project Type\tDetection\tInstallationNode.js\tpackage.json\tbun install (fallback to npm install) Docker\tDockerfile, docker-compose.yml\tdocker-compose up -d or docker build Python\trequirements.txt, setup.py\tVirtual environment + pip install Rust\tCargo.toml\tcargo build Go\tgo.mod\tgo mod tidy ","version":"Next","tagName":"h3"},{"title":"Supported IDEs","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#supported-ides","content":" git0 automatically detects and opens projects in your preferred IDE: Cursor (cursor)Windsurf (windsurf)VS Code (code)Code Server (code-server)Neovim (nvim) ","version":"Next","tagName":"h3"},{"title":"🔧 Configuration","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-configuration","content":" ","version":"Next","tagName":"h2"},{"title":"What Happens After Download","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#what-happens-after-download","content":" Repository is downloaded to your current directoryProject type is detected automaticallyDependencies are installed based on project typeIDE is launched automatically (if available)Development server starts (for Node.js projects) If a directory with the same name exists, git0 automatically appends a number (e.g., react-2, react-3). ","version":"Next","tagName":"h3"},{"title":"GitHub Token (Optional)","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#github-token-optional","content":" For higher API rate limits, set your GitHub token: export GITHUB_TOKEN=your_github_token_here Without a token, you're limited to 60 requests per hour. With a token, you get 5,000 requests per hour. ","version":"Next","tagName":"h3"},{"title":"github-api","type":0,"sectionRef":"#","url":"/functions/github-api","content":"","keywords":"","version":"Next"},{"title":"default","type":1,"pageTitle":"github-api","url":"/functions/github-api#default","content":" Defined in: src/github-api.js:17 GitHub API client for downloading repositories, searching, and managing releases GithubAPI ","version":"Next","tagName":"h2"},{"title":"Example","type":1,"pageTitle":"github-api","url":"/functions/github-api#example","content":" const github = new GithubAPI(); const repos = await github.searchRepositories('nodejs'); await github.downloadRepo('user/repo', './my-downloads'); ","version":"Next","tagName":"h3"},{"title":"Constructors","type":1,"pageTitle":"github-api","url":"/functions/github-api#constructors","content":" Constructor new default(options?: object): default; Defined in: src/github-api.js:36 Creates a new GithubAPI instance Parameters Parameter\tType\tDescription options? { baseURL?: string; debug?: boolean; token?: string; } Configuration options options.baseURL? string GitHub API base URL options.debug? boolean Enable debug logging options.token? string GitHub personal access token (defaults to GITHUB_TOKEN env var) Returns default Example // Use default settings with environment token // Use custom token const github = new GithubAPI({ token: 'ghp_xxxxxxxxxxxx' }); // Enable debug mode const github = new GithubAPI({ debug: true }); ","version":"Next","tagName":"h3"},{"title":"Properties","type":1,"pageTitle":"github-api","url":"/functions/github-api#properties","content":" baseURL baseURL: string; Defined in: src/github-api.js:39 client() client: (path: any, options?: object) => Promise<{ [key: string]: unknown; }>; Defined in: src/github-api.js:41 Parameters Parameter\tType path any options? { } Returns Promise<{ [key: string]: unknown; }> debug debug: boolean; Defined in: src/github-api.js:38 token token: string; Defined in: src/github-api.js:37 DEFAULT_RESULTS_PER_PAGE static DEFAULT_RESULTS_PER_PAGE: number = 10; Defined in: src/github-api.js:19 Constant Number of results to return per page for repository searches ","version":"Next","tagName":"h3"},{"title":"Methods","type":1,"pageTitle":"github-api","url":"/functions/github-api#methods","content":" downloadPackage() downloadPackage(packageURL: any, downloadPath: string): Promise<string>; Defined in: src/github-api.js:188 Downloads a release asset from GitHub and provides installation instructions Parameters Parameter\tType\tDescription packageURL any Download URL for the asset downloadPath string Directory to download the asset to Returns Promise<string> Path to the downloaded file Throws When download fails Example const asset = 'https://github.com/user/repo/releases/download/v1.0.0/myapp-v1.0.0-linux-x64' const downloadPath = await github.downloadPackage(asset, './downloads/myapp'); downloadRepo() downloadRepo(repo: string, targetDir?: string): Promise<string>; Defined in: src/github-api.js:69 Downloads a GitHub repository as a tarball and extracts it to a local directory Parameters Parameter\tType\tDefault value\tDescription repo string undefined Repository URL or owner/name format targetDir? string null Target directory name (defaults to repo name) Returns Promise<string> Path to the extracted repository directory Throws When repository download fails Example // Download repository to current directory const repoPath = await github.downloadRepo('https://github.com/user/repo'); // Download to specific directory const repoPath = await github.downloadRepo('user/repo', 'my-custom-dir'); getCompatibleReleases() getCompatibleReleases(owner: string, repo: string): Promise<any[]>; Defined in: src/github-api.js:310 Gets releases compatible with the current platform Parameters Parameter\tType\tDescription owner string Repository owner repo string Repository name Returns Promise<any[]> Array of compatible releases Example const compatible = await github.getCompatibleReleases('user', 'repo'); console.log(`Found ${compatible.length} compatible releases`); getCurrentPlatform() getCurrentPlatform(): any; Defined in: src/github-api.js:262 Detects the current operating system and architecture Returns any Platform information object Example const platform = github.getCurrentPlatform(); console.log(`Running on ${platform.os} ${platform.arch}`); getReleases() getReleases(owner: string, repo: string): Promise<any[]>; Defined in: src/github-api.js:296 Gets repository releases with platform categorization Parameters Parameter\tType\tDescription owner string Repository owner repo string Repository name Returns Promise<any[]> Array of categorized releases Example const releases = await github.getReleases('microsoft', 'vscode'); console.log(`Found ${releases.length} releases`); parseURL() parseURL(query: string): any; Defined in: src/github-api.js:241 Parses a GitHub URL or shorthand repository reference Parameters Parameter\tType\tDescription query string GitHub URL or owner/repo format Returns any Parsed git URL object or false if invalid Example // Parse full URL const parsed = github.parseURL('https://github.com/user/repo'); // Parse shorthand const parsed = github.parseURL('user/repo'); if (parsed) { console.log(`Owner: ${parsed.owner}, Name: ${parsed.name}`); } searchRepositories() searchRepositories(query: string, options?: object): Promise<any[]>; Defined in: src/github-api.js:130 Searches for GitHub repositories by name and enriches results with release information Parameters Parameter\tType\tDescription query string Search query for repository names options? { order?: string; perPage?: number; sort?: string; } Search options options.order? string Sort order (asc, desc) options.perPage? number Number of results per page (defaults to DEFAULT_RESULTS_PER_PAGE) options.sort? string Sort field (stars, forks, updated) Returns Promise<any[]> Array of repository objects with release information Throws When search fails Example const repos = await github.searchRepositories('nodejs'); repos.forEach(repo => { console.log(`${repo.name}: ${repo.hasReleases ? 'Has releases' : 'No releases'}`); }); // Custom search options const repos = await github.searchRepositories('react', { perPage: 5, sort: 'updated', order: 'desc' }); ","version":"Next","tagName":"h3"}],"options":{"id":"default"}}
|
|
1
|
+
{"searchDocs":[{"title":"modules","type":0,"sectionRef":"#","url":"/functions/modules","content":"","keywords":"","version":"Next"},{"title":"Modules","type":1,"pageTitle":"modules","url":"/functions/modules#modules","content":" fmgit0github-api ","version":"Next","tagName":"h2"},{"title":"fm","type":0,"sectionRef":"#","url":"/functions/fm","content":"fm Documentation / fm","keywords":"","version":"Next"},{"title":"Git0: Download Git Repo on Step Zero","type":0,"sectionRef":"#","url":"/functions/","content":"","keywords":"","version":"Next"},{"title":"🚀 Installation","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-installation","content":" npm install -g git0 bun install -g git0 ","version":"Next","tagName":"h2"},{"title":"✨ Features","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-features","content":" Search GitHub repositories by name with fuzzy matchingDownload repositories directly from GitHub URLs or owner/repo shortcuts. Skip the manual git clone, cd, install danceGet Releases instantly download latest release for your system or all systemsAutomatic dependency installation and installation for multiple project typesSmart IDE integration - automatically opens projects in your preferred editorCross-platform support - works on Windows, macOS, and LinuxConflict resolution - handles directory naming conflicts automaticallyFaster than git - skips .git history and uncompresses while downloading ","version":"Next","tagName":"h2"},{"title":"🎯 Usage","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-usage","content":" # Direct download from GitHub URL ## g and git0 both work g https://github.com/facebook/react # Search for repositories by name g react starter # Download using owner/repo shorthand git0 facebook/react # Use git0 without installing, (only node needed) # (copy this line into your project's readme to help others setup) npx git0 facebook/react ","version":"Next","tagName":"h2"},{"title":"Supported Project Types","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#supported-project-types","content":" git0 automatically detects and sets up the following project types: Project Type\tDetection\tInstallationNode.js\tpackage.json\tbun install (fallback to npm install) Docker\tDockerfile, docker-compose.yml\tdocker-compose up -d or docker build Python\trequirements.txt, setup.py\tVirtual environment + pip install Rust\tCargo.toml\tcargo build Go\tgo.mod\tgo mod tidy ","version":"Next","tagName":"h3"},{"title":"Supported IDEs","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#supported-ides","content":" git0 automatically detects and opens projects in your preferred IDE: Cursor (cursor)Windsurf (windsurf)VS Code (code)Code Server (code-server)Neovim (nvim)Webstorm (webstorm) ","version":"Next","tagName":"h3"},{"title":"🔧 Configuration","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#-configuration","content":" ","version":"Next","tagName":"h2"},{"title":"What Happens After Download","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#what-happens-after-download","content":" Repository is downloaded to your current directoryProject type is detected automaticallyDependencies are installed based on project typeIDE is launched automatically (if available)Development server starts (for Node.js projects) If a directory with the same name exists, git0 automatically appends a number (e.g., react-2, react-3). ","version":"Next","tagName":"h3"},{"title":"GitHub Token (Optional)","type":1,"pageTitle":"Git0: Download Git Repo on Step Zero","url":"/functions/#github-token-optional","content":" For higher API rate limits, set your GitHub token: export GITHUB_TOKEN=your_github_token_here Without a token, you're limited to 60 requests per hour. With a token, you get 5,000 requests per hour. ","version":"Next","tagName":"h3"},{"title":"git0","type":0,"sectionRef":"#","url":"/functions/git0","content":"","keywords":"","version":"Next"},{"title":"installDependencies()","type":1,"pageTitle":"git0","url":"/functions/git0#installdependencies","content":" function installDependencies(targetDir: string): Promise<void>; Defined in: src/git0.js:207 Automatically detects project type and installs dependencies Supports Node.js, Docker, Python, Rust, and Go projects ","version":"Next","tagName":"h2"},{"title":"Parameters","type":1,"pageTitle":"git0","url":"/functions/git0#parameters","content":" Parameter\tType\tDescription targetDir string Path to the project directory ","version":"Next","tagName":"h3"},{"title":"Returns","type":1,"pageTitle":"git0","url":"/functions/git0#returns","content":" Promise<void> ","version":"Next","tagName":"h3"},{"title":"Export","type":1,"pageTitle":"git0","url":"/functions/git0#export","content":" ","version":"Next","tagName":"h3"},{"title":"Async","type":1,"pageTitle":"git0","url":"/functions/git0#async","content":" ","version":"Next","tagName":"h3"},{"title":"openInIDE()","type":1,"pageTitle":"git0","url":"/functions/git0#openinide","content":" function openInIDE(targetDir: string): void; Defined in: src/git0.js:157 Opens a directory in the first available IDE/editor Also attempts to open a README or package.json file after 3 seconds ","version":"Next","tagName":"h2"},{"title":"Parameters","type":1,"pageTitle":"git0","url":"/functions/git0#parameters-1","content":" Parameter\tType\tDescription targetDir string Path to the directory to open ","version":"Next","tagName":"h3"},{"title":"Returns","type":1,"pageTitle":"git0","url":"/functions/git0#returns-1","content":" void ","version":"Next","tagName":"h3"},{"title":"Export","type":1,"pageTitle":"git0","url":"/functions/git0#export-1","content":"","version":"Next","tagName":"h3"},{"title":"github-api","type":0,"sectionRef":"#","url":"/functions/github-api","content":"","keywords":"","version":"Next"},{"title":"default","type":1,"pageTitle":"github-api","url":"/functions/github-api#default","content":" Defined in: src/github-api.js:17 GitHub API client for downloading repositories, searching, and managing releases GithubAPI ","version":"Next","tagName":"h2"},{"title":"Example","type":1,"pageTitle":"github-api","url":"/functions/github-api#example","content":" const github = new GithubAPI(); const repos = await github.searchRepositories('nodejs'); await github.downloadRepo('user/repo', './my-downloads'); ","version":"Next","tagName":"h3"},{"title":"Constructors","type":1,"pageTitle":"github-api","url":"/functions/github-api#constructors","content":" Constructor new default(options?: object): default; Defined in: src/github-api.js:36 Creates a new GithubAPI instance Parameters Parameter\tType\tDescription options? { baseURL?: string; debug?: boolean; token?: string; } Configuration options options.baseURL? string GitHub API base URL options.debug? boolean Enable debug logging options.token? string GitHub personal access token (defaults to GITHUB_TOKEN env var) Returns default Example // Use default settings with environment token // Use custom token const github = new GithubAPI({ token: 'ghp_xxxxxxxxxxxx' }); // Enable debug mode const github = new GithubAPI({ debug: true }); ","version":"Next","tagName":"h3"},{"title":"Properties","type":1,"pageTitle":"github-api","url":"/functions/github-api#properties","content":" baseURL baseURL: string; Defined in: src/github-api.js:39 callGithub() callGithub: (path: any, options?: object) => Promise<{ [key: string]: unknown; }>; Defined in: src/github-api.js:41 Parameters Parameter\tType path any options? { } Returns Promise<{ [key: string]: unknown; }> debug debug: boolean; Defined in: src/github-api.js:38 token token: string; Defined in: src/github-api.js:37 DEFAULT_RESULTS_PER_PAGE static DEFAULT_RESULTS_PER_PAGE: number = 10; Defined in: src/github-api.js:19 Constant Number of results to return per page for repository searches ","version":"Next","tagName":"h3"},{"title":"Methods","type":1,"pageTitle":"github-api","url":"/functions/github-api#methods","content":" downloadPackage() downloadPackage(packageURL: any, downloadPath: string): Promise<string>; Defined in: src/github-api.js:189 Downloads a release asset from GitHub and provides installation instructions Parameters Parameter\tType\tDescription packageURL any Download URL for the asset downloadPath string Directory to download the asset to Returns Promise<string> Path to the downloaded file Throws When download fails Example const asset = 'https://github.com/user/repo/releases/download/v1.0.0/myapp-v1.0.0-linux-x64' const downloadPath = await github.downloadPackage(asset, './downloads/myapp'); downloadRepo() downloadRepo(repo: string, targetDir?: string): Promise<string>; Defined in: src/github-api.js:70 Downloads a GitHub repository as a tarball and extracts it to a local directory Parameters Parameter\tType\tDefault value\tDescription repo string undefined Repository URL or owner/name format targetDir? string null Target directory name (defaults to repo name) Returns Promise<string> Path to the extracted repository directory Throws When repository download fails Example // Download repository to current directory const repoPath = await github.downloadRepo('https://github.com/user/repo'); // Download to specific directory const repoPath = await github.downloadRepo('user/repo', 'my-custom-dir'); getCompatibleReleases() getCompatibleReleases(owner: string, repo: string): Promise<any[]>; Defined in: src/github-api.js:310 Gets releases compatible with the current platform Parameters Parameter\tType\tDescription owner string Repository owner repo string Repository name Returns Promise<any[]> Array of compatible releases Example const compatible = await github.getCompatibleReleases('user', 'repo'); console.log(`Found ${compatible.length} compatible releases`); getCurrentPlatform() getCurrentPlatform(): any; Defined in: src/github-api.js:262 Detects the current operating system and architecture Returns any Platform information object Example const platform = github.getCurrentPlatform(); console.log(`Running on ${platform.os} ${platform.arch}`); getReleases() getReleases(owner: string, repo: string): Promise<any[]>; Defined in: src/github-api.js:296 Gets repository releases with platform categorization Parameters Parameter\tType\tDescription owner string Repository owner repo string Repository name Returns Promise<any[]> Array of categorized releases Example const releases = await github.getReleases('microsoft', 'vscode'); console.log(`Found ${releases.length} releases`); parseURL() parseURL(query: string): any; Defined in: src/github-api.js:241 Parses a GitHub URL or shorthand repository reference Parameters Parameter\tType\tDescription query string GitHub URL or owner/repo format Returns any Parsed git URL object or false if invalid Example // Parse full URL const parsed = github.parseURL('https://github.com/user/repo'); // Parse shorthand const parsed = github.parseURL('user/repo'); if (parsed) { console.log(`Owner: ${parsed.owner}, Name: ${parsed.name}`); } searchRepositories() searchRepositories(query: string, options?: object): Promise<any[]>; Defined in: src/github-api.js:131 Searches for GitHub repositories by name and enriches results with release information Parameters Parameter\tType\tDescription query string Search query for repository names options? { getReleaseInfo?: number; order?: string; perPage?: number; sort?: string; } Search options options.getReleaseInfo? number Should also check releases for each result options.order? string Sort order (asc, desc) options.perPage? number Number of results per page (defaults to DEFAULT_RESULTS_PER_PAGE) options.sort? string Sort field (stars, forks, updated) Returns Promise<any[]> Array of repository objects with release information Throws When search fails Example const repos = await github.searchRepositories('nodejs'); repos.forEach(repo => { console.log(`${repo.name}: ${repo.hasReleases ? 'Has releases' : 'No releases'}`); }); // Custom search options const repos = await github.searchRepositories('react', { perPage: 5, sort: 'updated', order: 'desc' }); ","version":"Next","tagName":"h3"}],"options":{"id":"default"}}
|
package/docs/sitemap.xml
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://git0.js.org/Footer</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/functions/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/functions/git0</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/functions/github-api</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/functions/modules</loc><changefreq>weekly</changefreq><priority>0.5</priority></url></urlset>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://git0.js.org/Footer</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/functions/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/functions/fm</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/functions/git0</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/functions/github-api</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://git0.js.org/functions/modules</loc><changefreq>weekly</changefreq><priority>0.5</priority></url></urlset>
|
|
@@ -60,6 +60,9 @@
|
|
|
60
60
|
869,
|
|
61
61
|
48
|
|
62
62
|
],
|
|
63
|
+
"a9cef9d5": [
|
|
64
|
+
327
|
|
65
|
+
],
|
|
63
66
|
"aba21aa0": [
|
|
64
67
|
742
|
|
65
68
|
],
|
|
@@ -82,9 +85,9 @@
|
|
|
82
85
|
"24": {
|
|
83
86
|
"js": [
|
|
84
87
|
{
|
|
85
|
-
"file": "assets/js/68cef36b.
|
|
86
|
-
"hash": "
|
|
87
|
-
"publicPath": "/assets/js/68cef36b.
|
|
88
|
+
"file": "assets/js/68cef36b.e5b1975b.js",
|
|
89
|
+
"hash": "5ffc772d92f26400",
|
|
90
|
+
"publicPath": "/assets/js/68cef36b.e5b1975b.js"
|
|
88
91
|
}
|
|
89
92
|
]
|
|
90
93
|
},
|
|
@@ -109,9 +112,9 @@
|
|
|
109
112
|
"174": {
|
|
110
113
|
"js": [
|
|
111
114
|
{
|
|
112
|
-
"file": "assets/js/299d276b.
|
|
113
|
-
"hash": "
|
|
114
|
-
"publicPath": "/assets/js/299d276b.
|
|
115
|
+
"file": "assets/js/299d276b.c9496717.js",
|
|
116
|
+
"hash": "f3f636de1e254d9a",
|
|
117
|
+
"publicPath": "/assets/js/299d276b.c9496717.js"
|
|
115
118
|
}
|
|
116
119
|
]
|
|
117
120
|
},
|
|
@@ -142,12 +145,21 @@
|
|
|
142
145
|
}
|
|
143
146
|
]
|
|
144
147
|
},
|
|
148
|
+
"327": {
|
|
149
|
+
"js": [
|
|
150
|
+
{
|
|
151
|
+
"file": "assets/js/a9cef9d5.a7253e41.js",
|
|
152
|
+
"hash": "6a14847550218341",
|
|
153
|
+
"publicPath": "/assets/js/a9cef9d5.a7253e41.js"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
145
157
|
"354": {
|
|
146
158
|
"js": [
|
|
147
159
|
{
|
|
148
|
-
"file": "assets/js/runtime~main.
|
|
149
|
-
"hash": "
|
|
150
|
-
"publicPath": "/assets/js/runtime~main.
|
|
160
|
+
"file": "assets/js/runtime~main.f69f8f44.js",
|
|
161
|
+
"hash": "07f4911f527f4d95",
|
|
162
|
+
"publicPath": "/assets/js/runtime~main.f69f8f44.js"
|
|
151
163
|
}
|
|
152
164
|
]
|
|
153
165
|
},
|
|
@@ -163,9 +175,9 @@
|
|
|
163
175
|
"567": {
|
|
164
176
|
"js": [
|
|
165
177
|
{
|
|
166
|
-
"file": "assets/js/22dd74f7.
|
|
167
|
-
"hash": "
|
|
168
|
-
"publicPath": "/assets/js/22dd74f7.
|
|
178
|
+
"file": "assets/js/22dd74f7.e13ac7a4.js",
|
|
179
|
+
"hash": "3fc39d881bc49f12",
|
|
180
|
+
"publicPath": "/assets/js/22dd74f7.e13ac7a4.js"
|
|
169
181
|
}
|
|
170
182
|
]
|
|
171
183
|
},
|
|
@@ -190,9 +202,9 @@
|
|
|
190
202
|
"618": {
|
|
191
203
|
"js": [
|
|
192
204
|
{
|
|
193
|
-
"file": "assets/js/28ab763d.
|
|
194
|
-
"hash": "
|
|
195
|
-
"publicPath": "/assets/js/28ab763d.
|
|
205
|
+
"file": "assets/js/28ab763d.192aa3bb.js",
|
|
206
|
+
"hash": "39548aa85348096a",
|
|
207
|
+
"publicPath": "/assets/js/28ab763d.192aa3bb.js"
|
|
196
208
|
}
|
|
197
209
|
]
|
|
198
210
|
},
|
|
@@ -208,9 +220,9 @@
|
|
|
208
220
|
"682": {
|
|
209
221
|
"js": [
|
|
210
222
|
{
|
|
211
|
-
"file": "assets/js/1df93b7f.
|
|
212
|
-
"hash": "
|
|
213
|
-
"publicPath": "/assets/js/1df93b7f.
|
|
223
|
+
"file": "assets/js/1df93b7f.1385eba0.js",
|
|
224
|
+
"hash": "10aa680fe6322009",
|
|
225
|
+
"publicPath": "/assets/js/1df93b7f.1385eba0.js"
|
|
214
226
|
},
|
|
215
227
|
{
|
|
216
228
|
"file": "assets/js/ac46717f.32345167.js",
|
|
@@ -231,9 +243,9 @@
|
|
|
231
243
|
"792": {
|
|
232
244
|
"js": [
|
|
233
245
|
{
|
|
234
|
-
"file": "assets/js/main.
|
|
235
|
-
"hash": "
|
|
236
|
-
"publicPath": "/assets/js/main.
|
|
246
|
+
"file": "assets/js/main.1f646b09.js",
|
|
247
|
+
"hash": "88a289feec6a6df9",
|
|
248
|
+
"publicPath": "/assets/js/main.1f646b09.js"
|
|
237
249
|
}
|
|
238
250
|
]
|
|
239
251
|
},
|
|
@@ -249,9 +261,9 @@
|
|
|
249
261
|
"893": {
|
|
250
262
|
"js": [
|
|
251
263
|
{
|
|
252
|
-
"file": "assets/js/c3a618e1.
|
|
253
|
-
"hash": "
|
|
254
|
-
"publicPath": "/assets/js/c3a618e1.
|
|
264
|
+
"file": "assets/js/c3a618e1.1c56fb03.js",
|
|
265
|
+
"hash": "32b551bddff0044b",
|
|
266
|
+
"publicPath": "/assets/js/c3a618e1.1c56fb03.js"
|
|
255
267
|
}
|
|
256
268
|
]
|
|
257
269
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"default":[{"type":"category","label":"Functions","collapsed":false,"items":[{"type":"link","label":"git0","href":"/functions/git0","docId":"functions/git0","unlisted":false},{"type":"link","label":"github-api","href":"/functions/github-api","docId":"functions/github-api","unlisted":false},{"type":"link","label":"index","href":"/functions/","docId":"functions/index","unlisted":false},{"type":"link","label":"modules","href":"/functions/modules","docId":"functions/modules","unlisted":false}],"collapsible":true}]},"docs":{"functions/git0":{"id":"functions/git0","title":"git0","description":"Documentation / git0","sidebar":"default"},"functions/github-api":{"id":"functions/github-api","title":"github-api","description":"Documentation / github-api","sidebar":"default"},"functions/index":{"id":"functions/index","title":"index","description":"
|
|
1
|
+
{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"default":[{"type":"category","label":"Functions","collapsed":false,"items":[{"type":"link","label":"fm","href":"/functions/fm","docId":"functions/fm","unlisted":false},{"type":"link","label":"git0","href":"/functions/git0","docId":"functions/git0","unlisted":false},{"type":"link","label":"github-api","href":"/functions/github-api","docId":"functions/github-api","unlisted":false},{"type":"link","label":"index","href":"/functions/","docId":"functions/index","unlisted":false},{"type":"link","label":"modules","href":"/functions/modules","docId":"functions/modules","unlisted":false}],"collapsible":true}]},"docs":{"functions/fm":{"id":"functions/fm","title":"fm","description":"Documentation / fm","sidebar":"default"},"functions/git0":{"id":"functions/git0","title":"git0","description":"Documentation / git0","sidebar":"default"},"functions/github-api":{"id":"functions/github-api","title":"github-api","description":"Documentation / github-api","sidebar":"default"},"functions/index":{"id":"functions/index","title":"index","description":"CLI tool to search GitHub repositories, download source & releases for your system, and instantly set up, then install dependencies and open code editor.","sidebar":"default"},"functions/modules":{"id":"functions/modules","title":"modules","description":"Modules","sidebar":"default"}}}}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "functions/fm",
|
|
3
|
+
"title": "fm",
|
|
4
|
+
"description": "Documentation / fm",
|
|
5
|
+
"source": "@site/src/functions/fm.md",
|
|
6
|
+
"sourceDirName": "functions",
|
|
7
|
+
"slug": "/functions/fm",
|
|
8
|
+
"permalink": "/functions/fm",
|
|
9
|
+
"draft": false,
|
|
10
|
+
"unlisted": false,
|
|
11
|
+
"tags": [],
|
|
12
|
+
"version": "current",
|
|
13
|
+
"frontMatter": {},
|
|
14
|
+
"sidebar": "default",
|
|
15
|
+
"next": {
|
|
16
|
+
"title": "git0",
|
|
17
|
+
"permalink": "/functions/git0"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "functions/index",
|
|
3
3
|
"title": "index",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "CLI tool to search GitHub repositories, download source & releases for your system, and instantly set up, then install dependencies and open code editor.",
|
|
5
5
|
"source": "@site/src/functions/index.md",
|
|
6
6
|
"sourceDirName": "functions",
|
|
7
7
|
"slug": "/functions/",
|
|
@@ -8,8 +8,13 @@
|
|
|
8
8
|
"label": "Next",
|
|
9
9
|
"isLast": true,
|
|
10
10
|
"path": "/",
|
|
11
|
-
"mainDocId": "functions/
|
|
11
|
+
"mainDocId": "functions/fm",
|
|
12
12
|
"docs": [
|
|
13
|
+
{
|
|
14
|
+
"id": "functions/fm",
|
|
15
|
+
"path": "/functions/fm",
|
|
16
|
+
"sidebar": "default"
|
|
17
|
+
},
|
|
13
18
|
{
|
|
14
19
|
"id": "functions/git0",
|
|
15
20
|
"path": "/functions/git0",
|
|
@@ -35,8 +40,8 @@
|
|
|
35
40
|
"sidebars": {
|
|
36
41
|
"default": {
|
|
37
42
|
"link": {
|
|
38
|
-
"path": "/functions/
|
|
39
|
-
"label": "functions/
|
|
43
|
+
"path": "/functions/fm",
|
|
44
|
+
"label": "functions/fm"
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
47
|
}
|
|
@@ -57,8 +62,8 @@
|
|
|
57
62
|
"docusaurus-lunr-search": {
|
|
58
63
|
"default": {
|
|
59
64
|
"fileNames": {
|
|
60
|
-
"searchDoc": "search-doc-
|
|
61
|
-
"lunrIndex": "lunr-index-
|
|
65
|
+
"searchDoc": "search-doc-1749760982052.json",
|
|
66
|
+
"lunrIndex": "lunr-index-1749760982052.json"
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
}
|
|
@@ -10,6 +10,7 @@ export default {
|
|
|
10
10
|
"a7456010": [() => import(/* webpackChunkName: "a7456010" */ "@generated/docusaurus-plugin-content-pages/default/__plugin.json"), "@generated/docusaurus-plugin-content-pages/default/__plugin.json", require.resolveWeak("@generated/docusaurus-plugin-content-pages/default/__plugin.json")],
|
|
11
11
|
"a7bd4aaa": [() => import(/* webpackChunkName: "a7bd4aaa" */ "@theme/DocVersionRoot"), "@theme/DocVersionRoot", require.resolveWeak("@theme/DocVersionRoot")],
|
|
12
12
|
"a94703ab": [() => import(/* webpackChunkName: "a94703ab" */ "@theme/DocRoot"), "@theme/DocRoot", require.resolveWeak("@theme/DocRoot")],
|
|
13
|
+
"a9cef9d5": [() => import(/* webpackChunkName: "a9cef9d5" */ "@site/src/functions/fm.md"), "@site/src/functions/fm.md", require.resolveWeak("@site/src/functions/fm.md")],
|
|
13
14
|
"aba21aa0": [() => import(/* webpackChunkName: "aba21aa0" */ "@generated/docusaurus-plugin-content-docs/default/__plugin.json"), "@generated/docusaurus-plugin-content-docs/default/__plugin.json", require.resolveWeak("@generated/docusaurus-plugin-content-docs/default/__plugin.json")],
|
|
14
15
|
"ac46717f": [() => import(/* webpackChunkName: "ac46717f" */ "@site/src/pages/Footer.tsx"), "@site/src/pages/Footer.tsx", require.resolveWeak("@site/src/pages/Footer.tsx")],
|
|
15
16
|
"c3a618e1": [() => import(/* webpackChunkName: "c3a618e1" */ "@site/src/functions/index.md"), "@site/src/functions/index.md", require.resolveWeak("@site/src/functions/index.md")],};
|
|
@@ -14,15 +14,15 @@ export default [
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
path: '/',
|
|
17
|
-
component: ComponentCreator('/', '
|
|
17
|
+
component: ComponentCreator('/', '45a'),
|
|
18
18
|
routes: [
|
|
19
19
|
{
|
|
20
20
|
path: '/',
|
|
21
|
-
component: ComponentCreator('/', '
|
|
21
|
+
component: ComponentCreator('/', '1de'),
|
|
22
22
|
routes: [
|
|
23
23
|
{
|
|
24
24
|
path: '/',
|
|
25
|
-
component: ComponentCreator('/', '
|
|
25
|
+
component: ComponentCreator('/', '65d'),
|
|
26
26
|
routes: [
|
|
27
27
|
{
|
|
28
28
|
path: '/functions/',
|
|
@@ -30,6 +30,12 @@ export default [
|
|
|
30
30
|
exact: true,
|
|
31
31
|
sidebar: "default"
|
|
32
32
|
},
|
|
33
|
+
{
|
|
34
|
+
path: '/functions/fm',
|
|
35
|
+
component: ComponentCreator('/functions/fm', '78b'),
|
|
36
|
+
exact: true,
|
|
37
|
+
sidebar: "default"
|
|
38
|
+
},
|
|
33
39
|
{
|
|
34
40
|
path: '/functions/git0',
|
|
35
41
|
component: ComponentCreator('/functions/git0', '8bf'),
|
|
@@ -13,23 +13,27 @@
|
|
|
13
13
|
},
|
|
14
14
|
"config": "5e9f5e1a"
|
|
15
15
|
},
|
|
16
|
-
"/-
|
|
16
|
+
"/-45a": {
|
|
17
17
|
"__comp": "5e95c892",
|
|
18
18
|
"__context": {
|
|
19
19
|
"plugin": "aba21aa0"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
"/-
|
|
22
|
+
"/-1de": {
|
|
23
23
|
"__comp": "a7bd4aaa",
|
|
24
24
|
"__props": "22dd74f7"
|
|
25
25
|
},
|
|
26
|
-
"/-
|
|
26
|
+
"/-65d": {
|
|
27
27
|
"__comp": "a94703ab"
|
|
28
28
|
},
|
|
29
29
|
"/functions/-5b3": {
|
|
30
30
|
"__comp": "17896441",
|
|
31
31
|
"content": "c3a618e1"
|
|
32
32
|
},
|
|
33
|
+
"/functions/fm-78b": {
|
|
34
|
+
"__comp": "17896441",
|
|
35
|
+
"content": "a9cef9d5"
|
|
36
|
+
},
|
|
33
37
|
"/functions/git0-8bf": {
|
|
34
38
|
"__comp": "17896441",
|
|
35
39
|
"content": "299d276b"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[Documentation](modules.md) / fm
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function installDependencies(targetDir: string): Promise<void>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [src/git0.js:
|
|
9
|
+
Defined in: [src/git0.js:207](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/git0.js#L207)
|
|
10
10
|
|
|
11
11
|
Automatically detects project type and installs dependencies
|
|
12
12
|
Supports Node.js, Docker, Python, Rust, and Go projects
|
|
@@ -58,7 +58,7 @@ Path to the project directory
|
|
|
58
58
|
function openInIDE(targetDir: string): void;
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Defined in: [src/git0.js:
|
|
61
|
+
Defined in: [src/git0.js:157](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/git0.js#L157)
|
|
62
62
|
|
|
63
63
|
Opens a directory in the first available IDE/editor
|
|
64
64
|
Also attempts to open a README or package.json file after 3 seconds
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## default
|
|
4
4
|
|
|
5
|
-
Defined in: [src/github-api.js:17](https://github.com/vtempest/git0/blob/
|
|
5
|
+
Defined in: [src/github-api.js:17](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L17)
|
|
6
6
|
|
|
7
7
|
GitHub API client for downloading repositories, searching, and managing releases
|
|
8
8
|
GithubAPI
|
|
@@ -23,7 +23,7 @@ await github.downloadRepo('user/repo', './my-downloads');
|
|
|
23
23
|
new default(options?: object): default;
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Defined in: [src/github-api.js:36](https://github.com/vtempest/git0/blob/
|
|
26
|
+
Defined in: [src/github-api.js:36](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L36)
|
|
27
27
|
|
|
28
28
|
Creates a new GithubAPI instance
|
|
29
29
|
|
|
@@ -133,17 +133,17 @@ const github = new GithubAPI({ debug: true });
|
|
|
133
133
|
baseURL: string;
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
Defined in: [src/github-api.js:39](https://github.com/vtempest/git0/blob/
|
|
136
|
+
Defined in: [src/github-api.js:39](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L39)
|
|
137
137
|
|
|
138
|
-
####
|
|
138
|
+
#### callGithub()
|
|
139
139
|
|
|
140
140
|
```ts
|
|
141
|
-
|
|
141
|
+
callGithub: (path: any, options?: object) => Promise<{
|
|
142
142
|
[key: string]: unknown;
|
|
143
143
|
}>;
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
-
Defined in: [src/github-api.js:41](https://github.com/vtempest/git0/blob/
|
|
146
|
+
Defined in: [src/github-api.js:41](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L41)
|
|
147
147
|
|
|
148
148
|
##### Parameters
|
|
149
149
|
|
|
@@ -194,7 +194,7 @@ Defined in: [src/github-api.js:41](https://github.com/vtempest/git0/blob/a8fc7e4
|
|
|
194
194
|
debug: boolean;
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
Defined in: [src/github-api.js:38](https://github.com/vtempest/git0/blob/
|
|
197
|
+
Defined in: [src/github-api.js:38](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L38)
|
|
198
198
|
|
|
199
199
|
#### token
|
|
200
200
|
|
|
@@ -202,7 +202,7 @@ Defined in: [src/github-api.js:38](https://github.com/vtempest/git0/blob/a8fc7e4
|
|
|
202
202
|
token: string;
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
-
Defined in: [src/github-api.js:37](https://github.com/vtempest/git0/blob/
|
|
205
|
+
Defined in: [src/github-api.js:37](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L37)
|
|
206
206
|
|
|
207
207
|
#### DEFAULT\_RESULTS\_PER\_PAGE
|
|
208
208
|
|
|
@@ -210,7 +210,7 @@ Defined in: [src/github-api.js:37](https://github.com/vtempest/git0/blob/a8fc7e4
|
|
|
210
210
|
static DEFAULT_RESULTS_PER_PAGE: number = 10;
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
Defined in: [src/github-api.js:19](https://github.com/vtempest/git0/blob/
|
|
213
|
+
Defined in: [src/github-api.js:19](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L19)
|
|
214
214
|
|
|
215
215
|
##### Constant
|
|
216
216
|
|
|
@@ -224,7 +224,7 @@ Number of results to return per page for repository searches
|
|
|
224
224
|
downloadPackage(packageURL: any, downloadPath: string): Promise<string>;
|
|
225
225
|
```
|
|
226
226
|
|
|
227
|
-
Defined in: [src/github-api.js:
|
|
227
|
+
Defined in: [src/github-api.js:189](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L189)
|
|
228
228
|
|
|
229
229
|
Downloads a release asset from GitHub and provides installation instructions
|
|
230
230
|
|
|
@@ -299,7 +299,7 @@ const downloadPath = await github.downloadPackage(asset, './downloads/myapp');
|
|
|
299
299
|
downloadRepo(repo: string, targetDir?: string): Promise<string>;
|
|
300
300
|
```
|
|
301
301
|
|
|
302
|
-
Defined in: [src/github-api.js:
|
|
302
|
+
Defined in: [src/github-api.js:70](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L70)
|
|
303
303
|
|
|
304
304
|
Downloads a GitHub repository as a tarball and extracts it to a local directory
|
|
305
305
|
|
|
@@ -388,7 +388,7 @@ const repoPath = await github.downloadRepo('user/repo', 'my-custom-dir');
|
|
|
388
388
|
getCompatibleReleases(owner: string, repo: string): Promise<any[]>;
|
|
389
389
|
```
|
|
390
390
|
|
|
391
|
-
Defined in: [src/github-api.js:310](https://github.com/vtempest/git0/blob/
|
|
391
|
+
Defined in: [src/github-api.js:310](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L310)
|
|
392
392
|
|
|
393
393
|
Gets releases compatible with the current platform
|
|
394
394
|
|
|
@@ -459,7 +459,7 @@ console.log(`Found ${compatible.length} compatible releases`);
|
|
|
459
459
|
getCurrentPlatform(): any;
|
|
460
460
|
```
|
|
461
461
|
|
|
462
|
-
Defined in: [src/github-api.js:262](https://github.com/vtempest/git0/blob/
|
|
462
|
+
Defined in: [src/github-api.js:262](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L262)
|
|
463
463
|
|
|
464
464
|
Detects the current operating system and architecture
|
|
465
465
|
|
|
@@ -482,7 +482,7 @@ console.log(`Running on ${platform.os} ${platform.arch}`);
|
|
|
482
482
|
getReleases(owner: string, repo: string): Promise<any[]>;
|
|
483
483
|
```
|
|
484
484
|
|
|
485
|
-
Defined in: [src/github-api.js:296](https://github.com/vtempest/git0/blob/
|
|
485
|
+
Defined in: [src/github-api.js:296](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L296)
|
|
486
486
|
|
|
487
487
|
Gets repository releases with platform categorization
|
|
488
488
|
|
|
@@ -553,7 +553,7 @@ console.log(`Found ${releases.length} releases`);
|
|
|
553
553
|
parseURL(query: string): any;
|
|
554
554
|
```
|
|
555
555
|
|
|
556
|
-
Defined in: [src/github-api.js:241](https://github.com/vtempest/git0/blob/
|
|
556
|
+
Defined in: [src/github-api.js:241](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L241)
|
|
557
557
|
|
|
558
558
|
Parses a GitHub URL or shorthand repository reference
|
|
559
559
|
|
|
@@ -614,7 +614,7 @@ if (parsed) {
|
|
|
614
614
|
searchRepositories(query: string, options?: object): Promise<any[]>;
|
|
615
615
|
```
|
|
616
616
|
|
|
617
|
-
Defined in: [src/github-api.js:
|
|
617
|
+
Defined in: [src/github-api.js:131](https://github.com/vtempest/git0/blob/59ed406649e41b4d7072fd6657f693b571f0088e/src/github-api.js#L131)
|
|
618
618
|
|
|
619
619
|
Searches for GitHub repositories by name and enriches results with release information
|
|
620
620
|
|
|
@@ -654,7 +654,7 @@ Search query for repository names
|
|
|
654
654
|
</td>
|
|
655
655
|
<td>
|
|
656
656
|
|
|
657
|
-
\{ `order?`: `string`; `perPage?`: `number`; `sort?`: `string`; \}
|
|
657
|
+
\{ `getReleaseInfo?`: `number`; `order?`: `string`; `perPage?`: `number`; `sort?`: `string`; \}
|
|
658
658
|
|
|
659
659
|
</td>
|
|
660
660
|
<td>
|
|
@@ -666,6 +666,23 @@ Search options
|
|
|
666
666
|
<tr>
|
|
667
667
|
<td>
|
|
668
668
|
|
|
669
|
+
`options.getReleaseInfo?`
|
|
670
|
+
|
|
671
|
+
</td>
|
|
672
|
+
<td>
|
|
673
|
+
|
|
674
|
+
`number`
|
|
675
|
+
|
|
676
|
+
</td>
|
|
677
|
+
<td>
|
|
678
|
+
|
|
679
|
+
Should also check releases for each result
|
|
680
|
+
|
|
681
|
+
</td>
|
|
682
|
+
</tr>
|
|
683
|
+
<tr>
|
|
684
|
+
<td>
|
|
685
|
+
|
|
669
686
|
`options.order?`
|
|
670
687
|
|
|
671
688
|
</td>
|