{"id":30769337,"url":"https://github.com/synle/bashrc","last_synced_at":"2026-05-12T02:01:20.301Z","repository":{"id":351811367,"uuid":"1210676936","full_name":"synle/bashrc","owner":"synle","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-08T17:39:03.000Z","size":446164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T19:28:50.120Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/synle.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":null,"dco":null,"cla":null}},"created_at":"2026-04-14T16:43:11.000Z","updated_at":"2026-05-08T17:37:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/synle/bashrc","commit_stats":null,"previous_names":["synle/bashrc"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/synle/bashrc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synle%2Fbashrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synle%2Fbashrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synle%2Fbashrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synle%2Fbashrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synle","download_url":"https://codeload.github.com/synle/bashrc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synle%2Fbashrc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32920398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"online","status_checked_at":"2026-05-12T02:00:06.338Z","response_time":102,"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":["bash","debian","osx","ubuntu","wsl"],"created_at":"2025-09-04T22:08:02.329Z","updated_at":"2026-05-12T02:01:20.059Z","avatar_url":"https://github.com/synle.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# synle/bashrc\n\n[![build](https://github.com/synle/bashrc/actions/workflows/build-main.yml/badge.svg)](https://github.com/synle/bashrc/actions/workflows/build-main.yml)\n\nPersonal bash profile and dotfiles management system. Automates shell configuration, editor settings, fonts, Git config, and OS-specific tweaks across 6+ platforms from a single codebase.\n\n## Demo\n\nhttps://synle.github.io/bashrc/\n\n## Supported Platforms\n\n- macOS\n- Ubuntu / Debian / Mint\n- Windows (PowerShell + MinGW) / WSL\n- Android Termux\n- Arch Linux / SteamOS\n- ChromeOS\n- Red Hat / Fedora\n\n## Highlights\n\n### Cross-Platform Tab Completion System (Complete-Spec)\n\nA custom spec-based autocomplete system that works on both Bash and PowerShell from the same source files. Plain text spec files define completions for any command -- no shell-specific syntax required.\n\n- **37 spec files** covering **49 commands** (including aliases like `g` for `git`, `n` for `npm`)\n- **27 dynamic tokens** that expand at tab time (`__git_branches__`, `__npm_scripts__`, `__makefile_targets__`, `__ssh_hosts__`, etc.)\n- **Nested subcommand support** (`kubectl rollout status \u003cTAB\u003e` gives resource types + flags)\n- **Spec generators** that auto-build specs from `--help` output (git, docker, npm)\n- **Alias proxying** -- one line to give any alias the same completions as its target command\n\nSpec format -- one line per subcommand, one file per command:\n\n```\ncheckout|__git_branches__,__git_files__,--force,-f,-b,-B,--track,-t\ncommit|__git_commit_flags__\npush|__git_remotes__,__git_branches__,--force,-f,--set-upstream,-u\nrun|__npm_scripts__\n```\n\n### Marker-Based Profile Assembly\n\n`~/.bash_syle` is assembled from 20+ self-contained scripts using `# BEGIN`/`# END` markers. Each script owns its own section -- add a tool by creating one file, remove it by deleting that file. No central config to edit.\n\n### Node | Bash Pipeline\n\nScripts are written in Node.js but execute as bash. `cat index.js | node | bash` -- Node generates bash commands to stdout, bash executes them. This gives you the full power of Node (async I/O, JSON parsing, template literals) with native shell integration.\n\n### Tagged Template Literal API\n\nSix tagged template literals replace a dozen legacy functions with one consistent pattern:\n\n```js\ncode`...`; // dedented string\nlist`...`; // array of lines\njson`{ \"key\": \"value\" }`; // parsed JSONC\nawait readText`software/scripts/foo.bash`; // universal reader (file, URL, or repo path)\nawait readJson`software/scripts/foo.jsonc`; // universal JSONC reader\n```\n\n### Build-Include System\n\nA marker-based build system that inlines file content between `# BEGIN path` / `# END path` markers and processes `// {{theme.key}}` inline markers in JSONC files from a central color map. One `make format_build_include` keeps everything in sync.\n\n### Editor Configuration\n\nManages settings, keybindings, extensions, and themes for VS Code, Sublime Text, Zed, and Vim across all platforms. Dark/light theme colors are centralized in one color map and propagated to all editor configs at build time.\n\n```bash\nbash run.sh --files=\"sublime-text.js,sublime-merge.js,vs-code-ext.sh\"\n```\n\n### CI/CD\n\nGitHub Actions with 5 parallel OS builds (Ubuntu, RHEL, Arch, Debian, macOS), automated formatting, webapp deployment to GitHub Pages, and profile syntax testing across all platforms.\n\n## Installation\n\n\u003c!-- BEGIN software/bootstrap/setup.sh --\u003e\n\n```bash\nif [ \"$(echo \"${SKIP_SETUP:-}\" | tr -d '[:space:]')\" = \"true\" ] || [ \"$(echo \"${SKIP_SETUP:-}\" | tr -d '[:space:]')\" = \"1\" ]; then\n  echo \"\u003e\u003e SKIP_SETUP is set, skipping dependency setup\"\n  curl -fsSL https://github.com/synle/bashrc/blob/HEAD/run.sh?raw=1 | bash\nelse\n  curl -fsSL https://github.com/synle/bashrc/blob/HEAD/run.sh?raw=1 | bash -s -- --setup\nfi\n```\n\n\u003c!-- END software/bootstrap/setup.sh --\u003e\n\n## Usage\n\n```bash\nmake setup             # Full setup from local files (installs dependencies)\nmake setup_local_profile # Refresh profile only (no dependency install)\nmake setup_prod        # Bootstrap from GitHub\nmake validate          # Format + run tests\nmake build             # Build all artifacts\nmake test_all          # Run all test suites\nmake dry_run           # Unit tests + dry-run all scripts (no file writes)\nmake clean             # Clean up\nmake doctor            # Run diagnostics\n```\n\n### run.sh\n\n```bash\nbash run.sh                          # Full run (auto-detects local repo or fetches from GitHub)\nbash run.sh --files=\"git.js\"         # Run specific file(s)\nbash run.sh git.js vim-config.js     # Bare args as files\nbash run.sh --debug                  # Keep temp files, show retry commands\nbash run.sh --force-refresh          # Force reinstall (heavy items only if stale \u003e2 weeks)\nbash run.sh --refresh=\"fzf.js,fonts.js\" # Force refresh specific scripts\nbash run.sh --verbose                # Enable bash tracing (set -x)\nbash run.sh --preset=lightweight     # Run a named preset (expands to its file list); see software/metadata/presets.json\nbash run.sh --preset=editor          # Partial-name match (case-insensitive); auto-resolves if exactly 1 hit\nbash run.sh --files=vim              # Same partial match for files; ambiguous matches print copy-paste suggestions\nbash run.sh --dryrun                 # Show what would change without writing\nbash run.sh --remove --files=\"fzf.js\"  # Remove a script's config\n```\n\n## Architecture\n\n```\nrun.sh / Makefile\n  -\u003e source common-env.sh (OS detection, env vars)\n  -\u003e cat software/index.js | node | bash\n       -\u003e index.js discovers scripts, emits bash commands to stdout\n       -\u003e bash executes them (installs tools, writes configs, assembles profile)\n  -\u003e ~cleanup.js strips unfilled markers, writes build artifacts\n```\n\nScripts are auto-discovered from `software/scripts/`. Filename prefixes control execution order (`_init` first, `~cleanup` last, alphabetical in between). OS-specific scripts live in `software/scripts/\u003cos\u003e/`.\n\nFor the full architecture deep-dive (execution lifecycle, data flow diagrams, script bundling, adding new scripts, etc.), see **[DEV.md](DEV.md)**.\n\n## Fun Facts\n\n### Current Equipment\n\n#### Legion Go Deck\n\nUpgraded to 2TB 2280 NVMe with an adapter. Installed SteamOS.\n\n#### Laptop (Asus ROG G14)\n\n- AMD 7940S\n- GeForce 4060\n- Upgraded to 40GB RAM\n- Upgraded to 2TB NVMe\n- Dual boot Windows 11 IoT LTSC (with WSL 2 / Ubuntu 24.04) / Linux Mint\n\n#### AI Workstation (HP Omen 45L)\n\n- Intel Core Ultra 9 285K\n- 64GB Kingston FURY DDR5-5600\n- NVIDIA GeForce RTX 5090 (32GB GDDR7)\n- Dual boot Windows 11 IoT LTSC (with WSL 2 / Ubuntu 24.04) / Linux Mint\n\n### Past Equipments\n\n#### Steam Deck\n\nUpgraded from 64GB eMMC to 1TB 2230 NVMe.\n\n#### Laptop (Gigabyte Aero 16)\n\n- Intel Core i7-12700H\n- GeForce 3070 Ti\n- Upgraded to 64GB RAM, 2TB NVMe\n- Windows 10 IoT LTSC (with WSL 2 / Debian)\n\n#### macOS Laptop (MacBook Pro 14\" M1 - 16GB / 512GB)\n\n#### Chromebook (Samsung - 8GB / 128GB)\n\n- ChromeOS with Ubuntu container\n\n#### Desktop (Lenovo P520)\n\n- Intel Xeon W-2145\n- Upgraded to 128GB RAM\n- 2x2TB NVMe, 8TB HDD\n- Gigabyte Eagle 3090\n- Custom fan mods (2x120mm intake, 120mm exhaust)\n- Dual boot Windows 10 IoT LTSC / Ubuntu 22.04\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynle%2Fbashrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynle%2Fbashrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynle%2Fbashrc/lists"}