{"id":46234155,"url":"https://github.com/magicdrive/ark","last_synced_at":"2026-04-02T11:33:23.473Z","repository":{"id":299439576,"uuid":"994734060","full_name":"magicdrive/ark","owner":"magicdrive","description":"Yet another alternate [directory | repository] represent text generator tool","archived":false,"fork":false,"pushed_at":"2026-03-19T09:24:37.000Z","size":224,"stargazers_count":22,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-19T14:25:17.705Z","etag":null,"topics":["ai","directory-tree","llm","summary"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magicdrive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-02T11:58:23.000Z","updated_at":"2026-03-19T09:24:03.000Z","dependencies_parsed_at":"2025-06-24T12:28:30.954Z","dependency_job_id":"1c82dd5f-89cb-4be8-b256-7a00d9487c5d","html_url":"https://github.com/magicdrive/ark","commit_stats":null,"previous_names":["magicdrive/ark"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/magicdrive/ark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdrive%2Fark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdrive%2Fark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdrive%2Fark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdrive%2Fark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicdrive","download_url":"https://codeload.github.com/magicdrive/ark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdrive%2Fark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","directory-tree","llm","summary"],"created_at":"2026-03-03T18:32:13.996Z","updated_at":"2026-04-02T11:33:23.465Z","avatar_url":"https://github.com/magicdrive.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Ark\n\n\u003e Yet another alternate \\[directory | repository\\] text generator tool\n\n**ark** recursively scans a directory and produces a clean, human‑readable dump of the tree and file contents. Perfect for\n\n* 📚 sharing codebases with LLMs\n* 🧪 static‑analysis pipelines\n* 🗂️ snapshotting source trees\n\nIt supports **plaintext**, **markdown**, **XML**, and **arklite** outputs, full UTF‑8 handling (with optional skip), and extensive filtering.\n\n---\n\n## 🚀 Quick Start\n\n### 1 · Install\n\n### 1. Installation\n\n```bash\ngo install github.com/magicdrive/ark@latest\n```\n\nUsing Homebrew:\n\n```bash\nbrew install magicdrive/tap/ark\n```\n\nOr download a pre-built binary from [Releases](https://github.com/magicdrive/ark/releases).\n\n---\n\n### 2 · Generate an output file\n\n```bash\nark \u003cdirname\u003e                # creates ark_output.txt in the cwd\n```\n\n---\n\n## 🧰 Basic Usage\n\n```text\nark [OPTIONS] \u003cdirname\u003e\nark mcp-server [OPTIONS]\n```\n\n---\n\u003c!--\n## 📂 Sub‑commands\n\n| Command      | Description                    |\n|--------------|--------------------------------|\n| `mcp-server` | Run Ark as an HTTP MCP server. |\n\n\n---\n--\u003e\n\n## ⚙️ General Options\n\n| Option | Alias | Description | Default |\n|--------|-------|-------------|---------|\n| `--help` | `-h` | Show help and exit | – |\n| `--version` | `-v` | Show version | – |\n| `--output-filename \u003cfile\u003e` | `-o` | Name of the output file | `ark_output.txt` |\n| `--scan-buffer \u003csize\u003e` | `-b` | Read buffer size (`10M`, `500K`, …) | `10M` |\n| `--output-format \u003cfmt\u003e` | `-f` | `txt`, `md`, `xml`, `arklite` | `txt` |\n| `--mask-secrets \u003con/off\u003e` | `-m` | Detect \u0026 mask secrets | `on` |\n| `--allow-gitignore \u003con/off\u003e` | `-a` | Obey `.gitignore` rules | `on` |\n| `--additionally-ignorerule \u003cfile\u003e` | `-A` | Extra ignore‑rule file | – |\n| `--with-line-number \u003con/off\u003e` | `-n` | Prepend line numbers | `on` |\n| `--ignore-dotfile \u003con/off\u003e` | `-d` | Skip dotfiles | `off` |\n| `--pattern-regex \u003cregexp\u003e` | `-x` | Include paths matching regexp | – |\n| `--include-ext \u003cexts\u003e` | `-i` | Include only ext(s) (`go,ts,html`) | – |\n| `--exclude-dir-regex \u003cregexp\u003e` | `-g` | Exclude dirs matching regexp | – |\n| `--exclude-file-regex \u003cregexp\u003e` | `-G` | Exclude files matching regexp | – |\n| `--exclude-ext \u003cexts\u003e` | `-e` | Exclude ext(s) | – |\n| `--exclude-dir \u003cnames\u003e` | `-E` | Exclude dirs by name | – |\n| `--compless` | `-c` | Compress result with **arklite** | – |\n| `--skip-non-utf8` | `-s` | Ignore non‑UTF‑8 files | – |\n| `--silent` | `-S` | Suppress logs / progress | – |\n| `--delete-comments` | `-D` | Strip comments (language‑aware) | – |\n\n---\n\n## 🛰  mcp‑server Options\n\n| Option | Alias | Description | Default |\n|--------|-------|-------------|---------|\n| `--root \u003cdir\u003e` | `-r` | Serve directory root | `$PWD` |\n| `--type \u003cstdio\\|http\u003e` | `-t` | HTTP listen port | `stdio` |\n| `--http-port \u003cport\u003e` | `-p` | HTTP listen port | `8522` |\n| `--scan-buffer \u003csize\u003e` | `-b` | Read buffer size (`10M`, `500K`, …) | `10M` |\n| `--mask-secrets \u003con/off\u003e` | `-m` | Detect \u0026 mask secrets | `on` |\n| `--allow-gitignore \u003con/off\u003e` | `-a` | Obey `.gitignore` rules | `on` |\n| `--additionally-ignorerule \u003cfile\u003e` | `-A` | Extra ignore‑rule file | – |\n| `--ignore-dotfile \u003con/off\u003e` | `-d` | Skip dotfiles | `off` |\n| `--pattern-regex \u003cregexp\u003e` | `-x` | Include paths matching regexp | – |\n| `--include-ext \u003cexts\u003e` | `-i` | Include only ext(s) (`go,ts,html`) | – |\n| `--exclude-dir-regex \u003cregexp\u003e` | `-g` | Exclude dirs matching regexp | – |\n| `--exclude-file-regex \u003cregexp\u003e` | `-G` | Exclude files matching regexp | – |\n| `--exclude-ext \u003cexts\u003e` | `-e` | Exclude ext(s) | – |\n| `--exclude-dir \u003cnames\u003e` | `-E` | Exclude dirs by name | – |\n| `--skip-non-utf8` | `-s` | Ignore non‑UTF‑8 files | – |\n| `--delete-comments` | `-D` | Strip comments (language‑aware) | – |\n\n---\n\n## 📝 Arguments\n\n| Argument | Description |\n|----------|-------------|\n| `\u003cdirname\u003e` | Directory to scan |\n| `\u003cbyte-string\u003e` | Size string (`10M`, `100K`, …) |\n| `\u003cextension\u003e` | File extension (`go`, `ts`, `html`) |\n| `\u003cregexp\u003e` | Go `regexp` syntax pattern |\n\n---\n\n## 📦 Output Examples\n\n\u003cdetails\u003e\n\u003csummary\u003ePlaintext \u003ccode\u003e(--output-format txt)\u003c/code\u003e\u003c/summary\u003e\n\n```text\nexample_project\n├── main.go\n└── sub\n    └── sub.txt\n\n=== sub/sub.txt ===\nhello world\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMarkdown \u003ccode\u003e(--output-format md)\u003c/code\u003e\u003c/summary\u003e\n\n````markdown\n# Project Tree\n```\nexample_project\n├── main.go\n└── sub\n    └── sub.txt\n```\n\n---\n\n# File: sub/sub.txt\n```txt\nhello world\n```\n````\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eXML \u003ccode\u003e(--output-format xml)\u003c/code\u003e\u003c/summary\u003e\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cProjectDump\u003e\n  \u003cDescription\u003e\n    \u003cProjectName\u003eexample_project\u003c/ProjectName\u003e\n    \u003cProjectPath\u003e/abs/path/example_project\u003c/ProjectPath\u003e\n  \u003c/Description\u003e\n  \u003cTree\u003e\u003c![CDATA[\nexample_project\n├── main.go\n└── sub\n    └── sub.txt\n  ]]\u003e\u003c/Tree\u003e\n  \u003cFiles\u003e\n    \u003cFile path=\"main.go\"\u003e\u003c![CDATA[\npackage main\nfunc main() { println(\"hello\") }\n    ]]\u003e\u003c/File\u003e\n    \u003cFile path=\"sub/sub.txt\"\u003e\u003c![CDATA[\nhello world\n    ]]\u003e\u003c/File\u003e\n  \u003c/Files\u003e\n\u003c/ProjectDump\u003e\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eArklite \u003ccode\u003e(--output-format arklite)\u003c/code\u003e\u003c/summary\u003e\n\n```\n# Arklite Format: example_project (/abs/path/example_project)\n\n## Directory Tree (JSON)\n{\"name\":\"example_project\",\"type\":\"directory\",\"children\":[{\"name\":\"main.go\",\"type\":\"file\"},{\"name\":\"sub\",\"type\":\"directory\",\"children\":[{\"name\":\"sub.txt\",\"type\":\"file\"}]}]}\n\n## File Dump\n@main.go\npackage main␤func main(){␤println(\"hello\")␤}\n@sub/sub.txt\nhello world\n```\n\u003c/details\u003e\n\n---\n\n## 🤔 What is Arklite?\n\nArklite is a compact single‑line‑per‑file format tuned for LLM token efficiency:\n\n1. Natural‑language header (project + path)  \n2. JSON directory tree  \n3. File dump (`@path` + content with `␤` for newlines)\n\n---\n\n## 🗂 Example `.arkignore`\n\n```gitignore\n# VCS\n.git/\n.hg/\n.svn/\n\n# IDEs / editors\n.idea/\n.vscode/\n*.code-workspace\n*.sublime-*\n```\n\n---\n\n## 🧩 Shell Completions\n\n```sh\n# Bash \u0026 Zsh\nsource completions/ark-completion.sh\n# Fish\nfuncsave ark\n```\n\n---\n\n## 📎 See Also\n\n* Project home — \u003chttps://github.com/magicdrive/ark\u003e\n\n## Author\n\n© 2025 Hiroshi IKEGAMI\n\n## License\n\nReleased under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicdrive%2Fark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicdrive%2Fark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicdrive%2Fark/lists"}