GithubHelp home page GithubHelp logo

campvanilla / ditto Goto Github PK

View Code? Open in Web Editor NEW
111.0 4.0 3.0 90 KB

A CLI tool to convert your VSCode theme to an iTerm2 theme. ๐ŸŽจ

Home Page: https://github.com/campvanilla/ditto

License: GNU General Public License v3.0

JavaScript 100.00%
cli vscode theme iterm2 iterm2-theme iterm2-color-scheme

ditto's Introduction

Banner

CI npm (scoped) GitHub All Contributors

ditto

A CLI tool to convert your VSCode theme to an iTerm2 theme. ๐ŸŽจ

BannerGif

Usage

System requirements

  • NodeJS 10+. The tool does work with NodeJS 8.x, but we do not officially support it.

Tested on macOS, Linux and Windows (via Windows Terminal)

Running / Installation

We recommend using npx to run the CLI:-

npx @campvanilla/ditto-cli

Or, alternatively, install it globally via npm and then run:-

$ npm install -g @campvanilla/ditto-cli

$ ditto-cli

Setting in iTerm2

Once an iterm color scheme file is generated, Cmd + Click on the file name (with extension as *.itermcolors) in iTerm2 to automatically import the preset into iTerm & then select the theme from preferences (Cmd + i โ†’ Colors tab โ†’ Color Presets โ†’ Select the generated color preset).

Custom Options

CLI Argument Optional Description Default Value
--extensions-dir yes To specify the folder containing your VSCode extensions you've configured VSCode to save extensions in a custom directory

Mac: ~/.vscode/extensions

Linux: ~/.vscode/extensions

Windows: C:/Users/{currentUser}/.vscode/extensions

--out-dir yes To specify the folder to which the iTerm2 theme file will be written The current working directory
--verbose yes Execute cli with verbose output false
--dry-run yes Execute script without writing final iTerm2 theme to disk false
--help yes Provides documentation -

Development

  1. Clone the project
$ git clone https://github.com/campvanilla/ditto.git
  1. Install dependencies
$ npm install
  1. To test the changes to the tool, create a local build of the project
$ npm link

This should add the ditto-cli command to terminal.

$ ditto-cli

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Aditi Mohanty

๐Ÿค” ๐Ÿ’ป ๐Ÿšง

Abinav Seelan

๐Ÿ’ป ๐Ÿšง

This project follows the all-contributors specification. Contributions of any kind welcome!

ditto's People

Contributors

abinavseelan avatar allcontributors[bot] avatar rheaditi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ditto's Issues

Running the tool throws: At least one choice must be selectable

Tried first with pnpm, then went to try with npm and got the same error.

$ npx @campvanilla/ditto-cli                                                                                                                                                                  8s ๎˜— 16.15.0 11:53:40 AM
Need to install the following packages:
  @campvanilla/[email protected]
Ok to proceed? (y) y
/Users/work/.npm/_npx/1c411290f289f2c0/node_modules/enquirer/lib/types/array.js:38
      throw new Error('At least one choice must be selectable');
            ^

Error: At least one choice must be selectable
    at AutoComplete.reset (/Users/work/.npm/_npx/1c411290f289f2c0/node_modules/enquirer/lib/types/array.js:38:13)
    at async AutoComplete.initialize (/Users/work/.npm/_npx/1c411290f289f2c0/node_modules/enquirer/lib/types/array.js:25:5)
    at async /Users/work/.npm/_npx/1c411290f289f2c0/node_modules/enquirer/lib/prompt.js:236:7

Node.js v18.13.0

throw ENOENT on disabled vscode extensions

Encountered ๐Ÿ˜”

It gives ENOENT error on disabled VSCode extensions. When I remove the disabled extension, it switches to the next disabled extension and gives the same ENOENT error.

Expectation ๐Ÿ’ญ

I expect to bypass disabled extensions and not get any error.

Traceback

$ npx @campvanilla/ditto-cli
Something went wrong! [Error: ENOENT: no such file or directory, open '$HOME/.vscode/extensions/apollographql.vscode-apollo-1.19.10/package.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '$HOME/.vscode/extensions/apollographql.vscode-apollo-1.19.10/package.json'
}
$ npx envinfo --system --IDEs

  System:
    OS: macOS 12.6
    CPU: (8) arm64 Apple M1
    Memory: 376.61 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  IDEs:
    VSCode: 1.72.2 - /usr/local/bin/code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.