{"id":35775898,"url":"https://github.com/YusufCeng1z/svelte-bash","last_synced_at":"2026-01-13T09:01:04.446Z","repository":{"id":328094270,"uuid":"1113499942","full_name":"YusufCeng1z/svelte-bash","owner":"YusufCeng1z","description":"A fully typed, lightweight, and customizable terminal emulator component for Svelte 5. Features a virtual file system, custom commands, themes, and autoplay mode for demos. 🚀","archived":false,"fork":false,"pushed_at":"2025-12-11T03:46:27.000Z","size":162,"stargazers_count":43,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-26T08:47:47.064Z","etag":null,"topics":["bash","cli","command-line","console","frontend","shell","svelte","svelte-5","svelte-component","terminal","terminal-emulator","typescript","ui-component"],"latest_commit_sha":null,"homepage":"https://svelte-bash.netlify.app/","language":"Svelte","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/YusufCeng1z.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":"2025-12-10T04:13:29.000Z","updated_at":"2025-12-22T16:11:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/YusufCeng1z/svelte-bash","commit_stats":null,"previous_names":["yusufceng1z/svelte-bash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YusufCeng1z/svelte-bash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YusufCeng1z%2Fsvelte-bash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YusufCeng1z%2Fsvelte-bash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YusufCeng1z%2Fsvelte-bash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YusufCeng1z%2Fsvelte-bash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YusufCeng1z","download_url":"https://codeload.github.com/YusufCeng1z/svelte-bash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YusufCeng1z%2Fsvelte-bash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28379228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T08:40:31.739Z","status":"ssl_error","status_checked_at":"2026-01-13T08:40:23.736Z","response_time":56,"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":["bash","cli","command-line","console","frontend","shell","svelte","svelte-5","svelte-component","terminal","terminal-emulator","typescript","ui-component"],"created_at":"2026-01-07T05:00:35.065Z","updated_at":"2026-01-13T09:01:04.392Z","avatar_url":"https://github.com/YusufCeng1z.png","language":"Svelte","funding_links":[],"categories":["UI Components","Svelte"],"sub_categories":["Miscellaneous"],"readme":"# Svelte Bash\n\n\u003cdiv align=\"center\"\u003e\n\n  \u003cimg src=\"static/svelte-bash.jpg\" alt=\"Svelte Bash Banner\" width=\"100%\" /\u003e\n\n  \u003ch1\u003eSvelte Bash\u003c/h1\u003e\n\n  \u003cp\u003e\n    \u003cstrong\u003eThe ultimate lightweight, fully typed, and customizable terminal component for Svelte 5.\u003c/strong\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://svelte-bash.netlify.app/\"\u003e\u003cstrong\u003eLive Demo\u003c/strong\u003e\u003c/a\u003e · \n    \u003ca href=\"https://www.npmjs.com/package/svelte-bash\"\u003e\u003cstrong\u003eNPM\u003c/strong\u003e\u003c/a\u003e · \n    \u003ca href=\"https://github.com/YusufCeng1z/svelte-bash\"\u003e\u003cstrong\u003eGitHub\u003c/strong\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/svelte-bash?style=flat-square\u0026color=blue\" alt=\"NPM Version\" /\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/svelte-bash?style=flat-square\u0026color=orange\" alt=\"License\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Svelte-5-orange?style=flat-square\u0026logo=svelte\" alt=\"Svelte 5\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Zero_Dependency-Used_Vanilla_CSS-blueviolet?style=flat-square\" alt=\"Zero Dependency\" /\u003e\n  \u003c/p\u003e\n\n\u003c/div\u003e\n\n---\n\n**Svelte Bash** is a high-performance terminal emulator component designed specifically for modern Svelte applications. It provides a realistic shell experience with a virtual file system, command history navigation, and advanced features like autoplay sequences for tutorials.\n\n\u003e **Note:** As of v1.0.1, svelte-bash has been refactored to use **Pure Vanilla CSS** internally. This means it has **ZERO dependencies** on Tailwind CSS and will render correctly in any project (including Bootstrap, Tailwind, or plain CSS projects). You do NOT need to install Tailwind.\n\nWhether you are building a developer portfolio, a documentation site, or a web-based CLI tool, Svelte Bash offers the perfect balance of aesthetics and functionality.\n\n## Key Features\n\n*   **Lightweight \u0026 Fast**: Zero external dependencies, ~4kb gzipped.\n*   **Virtual File System**: fully functional `ls`, `cd`, `cat`, and `pwd` commands.\n*   **Deep Theming**: Includes `dracula`, `matrix`, and `dark` presets, plus full CSS control.\n*   **Autoplay Mode**: Script commands to run automatically—perfect for landing page demos.\n*   **Accessible**: Proper focus management and keyboard history navigation (Up/Down arrows).\n*   **TypeScript**: Written in TypeScript for excellent type safety and autocomplete.\n\n## Installation\n\n```bash\nnpm install svelte-bash\n```\n\n## Usage\n\n### Basic Example\n\nImport the component and pass a `structure` object to define the virtual file system.\n\n```svelte\n\u003cscript\u003e\n  import { Terminal } from 'svelte-bash';\n\n  const fileSystem = {\n    'readme.md': '# Hello World',\n    'src': {\n       'app.js': 'console.log(\"Hi\")'\n    }\n  };\n\u003c/script\u003e\n\n\u003cTerminal \n    structure={fileSystem} \n    user=\"guest\"\n    style=\"height: 300px\"\n/\u003e\n```\n\n### Custom Commands\n\nYou can extend the terminal with your own commands by passing a `commands` object.\n\n```svelte\n\u003cscript\u003e\n  import { Terminal } from 'svelte-bash';\n\n  const myCommands = {\n    // Return a string\n    hello: () =\u003e \"Hello form svelte-bash!\",\n    \n    // Accept arguments\n    echo: (args) =\u003e args.join(' '),\n    \n    // Async support\n    fetchdata: async () =\u003e {\n        const res = await fetch('https://api.example.com/data');\n        return await res.text();\n    }\n  };\n\u003c/script\u003e\n\n\u003cTerminal commands={myCommands} /\u003e\n```\n\n### Autoplay (Show Mode)\n\nPerfect for documentation or presentations. The terminal will automatically type and execute the provided sequence.\n\n```svelte\n\u003cTerminal \n  autoplay={[\n    { command: \"npm install svelte-bash\" },\n    { command: \"echo 'Installation complete!'\", output: \"Done.\" }\n  ]}\n/\u003e\n```\n\n## Theming\n\nSvelte Bash allows comprehensive styling customization.\n\n**Built-in Presets:**\n- `dark` (default)\n- `light`\n- `dracula`\n- `matrix`\n\n**Custom Theme Object:**\n\n```svelte\n\u003cTerminal \n  theme={{\n    background: '#1a1b26',\n    foreground: '#a9b1d6',\n    prompt: '#7aa2f7',\n    cursor: '#c0caf5'\n  }}\n/\u003e\n```\n\n## API Reference\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `structure` | `FileStructure` | `{}` | Key-value pairs defining the virtual file system. |\n| `commands` | `Record\u003cstring, Function\u003e` | `{}` | Custom command handlers. |\n| `theme` | `string` \\| `Theme` | `'dark'` | Theme preset name or specific color object. |\n| `user` | `string` | `'user'` | The username displayed in the prompt. |\n| `machine` | `string` | `'machine'` | The machine name displayed in the prompt. |\n| `welcomeMessage` | `string` \\| `string[]` | `[]` | Message shown on initialization. |\n| `autoplay` | `AutoplayItem[]` | `undefined` | Array of commands to execute automatically. |\n| `readonly` | `boolean` | `false` | If true, user input is disabled. |\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT © [Yusuf Cengiz](https://github.com/YusufCeng1z)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYusufCeng1z%2Fsvelte-bash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYusufCeng1z%2Fsvelte-bash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYusufCeng1z%2Fsvelte-bash/lists"}