{"id":16611950,"url":"https://github.com/andreasarvidsson/bashbook","last_synced_at":"2025-06-17T05:34:03.228Z","repository":{"id":43763808,"uuid":"445588711","full_name":"AndreasArvidsson/bashbook","owner":"AndreasArvidsson","description":"A notebook for bash","archived":false,"fork":false,"pushed_at":"2023-03-24T20:03:22.000Z","size":360,"stargazers_count":11,"open_issues_count":13,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T03:51:15.110Z","etag":null,"topics":["bash","shell","terminal","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/AndreasArvidsson.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}},"created_at":"2022-01-07T16:45:25.000Z","updated_at":"2024-10-21T22:33:08.000Z","dependencies_parsed_at":"2023-01-17T22:15:45.240Z","dependency_job_id":null,"html_url":"https://github.com/AndreasArvidsson/bashbook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasArvidsson%2Fbashbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasArvidsson%2Fbashbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasArvidsson%2Fbashbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasArvidsson%2Fbashbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreasArvidsson","download_url":"https://codeload.github.com/AndreasArvidsson/bashbook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238864222,"owners_count":19543500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","shell","terminal","vscode","vscode-extension"],"created_at":"2024-10-12T01:40:19.874Z","updated_at":"2025-02-14T15:31:50.281Z","avatar_url":"https://github.com/AndreasArvidsson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BashBook\n\nNotebook for running bash/shell script\n\n![example ls](./images/example_ls.png)\n\n## Creating a BashBook\n\nBashBook the way you would any normal notebook\n\n1. Open a file with the `.bashbook` extension\n1. New File... / `Bash Notebook`\n1. Command / `BashBook: Create new Bash Notebook`\n\n## Commands\n\n- Create new Bash Notebook\n- Open notebook as markdown\n- Open all outputs in new file\n- Execute cell and select content\n- Execute cell and clear content\n- Execute and show output in below markdown cell\n- Clear cell content and edit\n- Copy cell output\n- Open cell output in new file\n\n## Details\n\n### One shell per notebook\n\nEach notebook is running one continuous shell. This means that commands running in one cell will effect the others. Only one execution is allowed at the time and the rest is queued.\n\n### Interactive terminal (prompt)\n\nInteraction with running execution is possible in the output terminal. Finished executions are non-interactive.\n\n![example prompt](./images/example_prompt.png)\n\n### Resize\n\n- Resizes terminal height to fit content dynamically\n- Resizes terminal width at end of execution. Only affects next execution.\n\n### Current Working Directory(CWD)\n\nTries to set CWD in following order\n\n1. File directory\n1. Workspace directory\n1. User home directory\n\n## Problem with Ubuntu/Debian\n\nOn a Ubuntu/Debian system you may get a `Cannot open resource with notebook editor` error if vscode is installed as a flatpack(Ubuntu Software). For BashBook to work correctly vscode needs to be installed with [apt install](https://code.visualstudio.com/docs/setup/linux#_debian-and-ubuntu-based-distributions)\n\n## Build details\n\n### Build local\n\n```\nnpm install\n\n# Run after each install\nnpm run rebuild\n\nnpm run compile\n\n# Build `.vsix` file\nnpm run package\n```\n\n### Dependencies\n\nDue to node-pty we have platform specific dependencies  \n[node-pty dependencies](https://github.com/Microsoft/node-pty#dependencies)\n\n### Components\n\n- node-pty\n- xterm.js\n\n### Rebuild node-pty with correct electron version\n\nIf you get an error `NODE_MODULE_VERSION` mismatch.\n\n1. Check the version of electron vscode is using. `Help =\u003e About =\u003e Electron`\n1. Make sure you have the correct version of electron in `package.json`. List of electron versions is available [here](https://github.com/electron/releases#releases)\n1. Run `npm run rebuild`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasarvidsson%2Fbashbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreasarvidsson%2Fbashbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasarvidsson%2Fbashbook/lists"}