Skip to content

cypherlab/okk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@cypherlab/okk

screenshot

🤖 Enhanced workflows for lazy programmers

npm version lisence


Whatever project you're working on, okk gives you access (via the command line) to a set of tools and commands that you can use to optimize your development workflows and manage your projects.

Install via NPM

yarn global add @cypherlab/okk

Commands

init

okk init // create/update .okkrc file

pkgs

Manage you multi repo packages.

okk pkgs
okk pkgs ls
okk pkgs add [repo]

script

Run a custom script

okk script // show all script
okk script foo // run ./scripts/foo.js

A script must exports a default async function:

export default async ({ utils, okk }) => {
  // pull some utils fonctions
  const { pwdImport, shell } = utils

  // import some random file from your current project folder
  const { default: users } = await pwdImport('./assets/users.js')  

  // echo data
  shell.echo(users.join(''))

  // return a valid exit code (0,1,2)
  return 0
}

From there, you have access to okk utility functions (via utils), and also to the okk instance (via okk)

by default, okk looks into a ./scripts folder for scripts. To change the default path add dirs.scripts path in your .okkrc file.

{
  "dirs": 
    "scripts": "./pathToScriptsFolder"
  }
}

Install from local repo

// clone this repo
git clone git@github.com:cypherlab/okk.git

// install package globaly 
yarn run link

// update okk
git pull
yarn run link

// delete okk
yarn run unlink 

// work on okk codebase:
// first unlink global okk yarn package
// then work in the repo, when done reinstall package globaly 
yarn run unlink
// work
yarn run link

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published