{"id":51577731,"url":"https://github.com/yano3nora/gistan","last_synced_at":"2026-07-11T02:02:14.936Z","repository":{"id":369550933,"uuid":"1290197308","full_name":"yano3nora/gistan","owner":"yano3nora","description":"A Deno + TypeScript CLI for managing a repo-backed collection of gist snippets.","archived":false,"fork":false,"pushed_at":"2026-07-05T20:45:57.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T22:12:38.436Z","etag":null,"topics":["cli","deno","gist","github"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yano3nora.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-07-05T17:30:50.000Z","updated_at":"2026-07-05T20:46:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yano3nora/gistan","commit_stats":null,"previous_names":["yano3nora/gistan"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/yano3nora/gistan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3nora%2Fgistan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3nora%2Fgistan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3nora%2Fgistan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3nora%2Fgistan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yano3nora","download_url":"https://codeload.github.com/yano3nora/gistan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yano3nora%2Fgistan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35348377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","deno","gist","github"],"created_at":"2026-07-11T02:02:13.636Z","updated_at":"2026-07-11T02:02:14.928Z","avatar_url":"https://github.com/yano3nora.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gistan\n\nA Deno + TypeScript CLI for managing a repo-backed gist collection. The local repo is the source of\ntruth; GitHub Gist is only the explicit publish surface.\n\n## Layout\n\n```text\n\u003cgist-repo\u003e/\n├ gists/\u003cdirname\u003e/\u003cfiles...\u003e   # 1 directory = 1 gist\n├ stars/                       # read-only cache\n└ .gistan/state.json           # index v2\n```\n\n`gists/\u003cdirname\u003e/.description.txt` is reserved metadata. Its trimmed content becomes the gist\ndescription, but it is **never uploaded as a gist file**. Multi-line descriptions are sent as-is;\nGitHub UI rendering is your responsibility. A remote gist containing a real `.description.txt` file\nis skipped on import.\n\n## Getting Started\n\n### Install with mise\n\n```sh\n# Latest release.\nmise use -g github:yano3nora/gistan\n\n# Pinned release.\nmise use -g github:yano3nora/gistan@0.1.0\n\ngistan --version\n```\n\nRelease assets use conventional OS/arch names so mise can auto-detect the right one:\n\n```text\ngistan-v0.1.0-linux-x64.tar.gz\ngistan-v0.1.0-linux-arm64.tar.gz\ngistan-v0.1.0-macos-x64.tar.gz\ngistan-v0.1.0-macos-arm64.tar.gz\ngistan-v0.1.0-windows-x64.zip\n```\n\nThe archive contains `gistan` at the archive root (`gistan.exe` for Windows). If you want the\nshorter `mise use -g gistan` form, `gistan` must also be registered in the upstream mise registry or\ndefined as a local tool alias.\n\n## Usage\n\nPrerequisites: `gh` authenticated with gist scope, plus `rg` and `fzf`.\n\n```sh\ngistan root init ~/gistan-repo     # scaffold the gist repo\ngistan import                      # import existing gists into gists/\n\ngistan new -d \"desc\" hello.md      # create gists/hello/hello.md with description\ngistan new tools/helper.ts         # adds gists/tools/helper.ts\ngistan search deno deploy !wip     # document search: space = AND, !term = exclude, rows are path:line: excerpt\ngistan hello                       # sugar: unrecognized input falls back to `gistan search hello`\ngistan grep 'error\\s+handling'     # line-level regex grep when you need the exact matching line\ngistan list                        # list gists/\n\ngistan publish hello               # publishes gists/hello as one gist (secret by default)\ngistan publish hello --public      # public must be an explicit opt-in\ngistan status                      # only conditions that need attention (like `git status`)\ngistan status --all                # the full listing, including in-sync/published gists\ngistan status --remote             # includes remote drift\ngistan pull hello                  # overwrite local dir from remote after confirmation on conflict\ngistan status --fix                # interactive fix of drifts\n\ngistan unpublish hello             # delete remote gist, keep local dir\ngistan rm hello/hello.md           # delete one file; asks if it is the last file\n```\n\nDaily operations above never touch the repo's own git history — they only read/write files and talk\nto `gist.github.com` via `gh`. Setup and origin git housekeeping (pushing/pulling the notes repo\nitself, not gists) live under `gistan root` instead, since conflating the two was confusing.\n\n```sh\ngistan root path                   # print the repo's absolute path, e.g. cd $(gistan root path)\ngistan root commit -m \"notes\"      # git add -A + commit (omit -m for an auto message)\ngistan root push                   # git push\ngistan root pull                   # git pull --rebase\ngistan root status                 # git status (same no-rewrap passthrough as push/pull)\n```\n\n### Composing with other tools\n\nThe repo is plain files, so any CLI composes through the repo path — gistan bundles no scanners or\nother integrations itself. For example, scan for secrets before committing or publishing:\n\n```sh\ngitleaks dir $(gistan root path) --no-banner   # secret scan (brew install gitleaks)\nrg -l TODO $(gistan root path)/gists           # or anything else that walks files\n```\n\n## Development\n\n```sh\nmise exec -- deno task check\nmise exec -- deno task test\nmise exec -- deno task compile\n```\n\nImportant rules:\n\n- GitHub API access goes through `gh api` subprocesses only.\n- `status` / `pull` / `publish` drift judgment must share `src/core/reconcile.ts`.\n- Do not commit, push, create releases, or publish packages from the agent; humans decide external\n  publication.\n\n### Test dev binary\n```sh\nmise exec -- deno task compile\n./gistan --version\n```\n\n## Deployment\n\ngistan ships as a single self-contained binary (`deno compile` embeds the runtime, ~80MB). Nothing\non the target machine needs Deno, but runtime integrations still require external CLIs: `gh`\n(authenticated, gist scope), `git`, and `rg` + `fzf` (search/edit/rm picks).\n\n```sh\n# 1. Bump VERSION, run check/test, and build all release assets.\nmise run release:prepare -- 0.1.0\n\n# 2. Review the diff, then commit the version bump yourself.\n# git diff\n# git add src/main.ts\n# git commit -m \"Release v0.1.0\"\n\n# 3. Human-only publishing step. This tags, pushes the tag, and creates the GitHub Release.\nmise run release:publish -- 0.1.0 --i-understand-this-pushes-and-publishes\n```\n\n`release:publish` refuses to run unless the working tree is clean, so the tag points at a committed\nversion bump instead of an uncommitted local edit.\n\nNew machine checklist: clone this repo → `mise install` → build \u0026 copy the binary → clone your notes\nrepo yourself → `gistan root init \u003cnotes-repo-dir\u003e`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyano3nora%2Fgistan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyano3nora%2Fgistan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyano3nora%2Fgistan/lists"}