Command line tools for usedevbook.com

dbk

dbk is a command-line tool (CLI) for usedevbook.com.

It allows you to build and push custom environments for Devbook VMs. You can then launch Devbook VMs with your custom environments via the Devbook SDK.

Installation

Download dbk and install into /usr/local/bin

curl -L https://usedevbook.com/install.sh | sh

Usage - deploying custom environment

Create and push custom VM environment

To build and push a custom environment do the following:

# 1. Go to a directory containing a Dockerfile.dbk and dbk.toml describing your custom VM environment
$ cd <environment-directory>

# 2. Call dbk to create and push yout environment
$ dbk push

Defining a custom VM environment

See example-env directory.

Devbook VM environment is described via two files:

  1. Dockerfile.dbk
    A Dockerfile describing the VM's environment. See more here.
  2. dbk.toml
    A configuration file. See more here.

Both files must be present in the same directory from where you're calling the dbk push command.

Dockerfile.dbk

The Dockerfile describing the VM's environment.

The Dockerfile.dbk must start with FROM devbook declaration. This makes sure you use the base Docker image that is compatible with the Devbook's VM.

# Use the Devbook base image.
FROM devbook

# Your custom setup.
# You can for example copy files, scripts, install packages, binaries, etc.
# E.g. install Python
RUN apt-get update && apt-get install -y \
  python3-pip

Note: Don't use the CMD or the ENTRYPOINT commands in the Dockerfile. See the section bellow on how to start a process as soon as a VM boots up.

dbk.toml

The TOML configuration file. The minimal configuration file contains just the id field.

# Required. Unique ID for your Devbook VM. It must contain only lowercase letters, numbers or dash "-" and it must start with a letter.
id = "example-env"

# Optional. A command that will get executed when the VM boots up.
# You can put your custom scripts here, for example.
start_cmd = "echo Hello World"

Starting a process once the Devbook VM boots up

Use start_cmd in the dbk.toml configuration file to describe what command should be executed as soon as the VM boots up.

How to spawn Devbook VM with your custom environment with the Devbook SDK

All the interaction with Devbook VMs is handled via our frontend Devbook SDK. Following code snippets show how to spawn Devbook VM on our infrastructure with a custom environment that you created via dbk beforehand. Most likely, you will be calling Devbook SDK from your frontend project such as docs.

Pass the environment's id value from the dbk.toml config as the env parameter when initializing Devbook.

React

import { useDevbook } from '@devbookhq/sdk'

const { runCmd, stdout, stderr } = useDevbook({ env: 'example-env' })

JavaScript/TypeScript

import { Devbook } from '@devbookhq/sdk'

const dbk = new Devbook({ env: 'example-env' })
Owner
Devbook
Technical documentation reimagined
Devbook
Similar Resources

Igo Agent is the agent of Igo, a command-line tool, through which you can quickly start Igo

igo agent 英文 | 中文 Igo Agent is the agent of Igo, a command-line tool, through which you can quickly start Igo, and other capabilities may be added lat

Dec 22, 2021

A command-line debugging tool to check the latency of SSL handshake

ssl-handshake A command-line tool for testing SSL handshake latency, written in

Nov 13, 2022

⚔️ Web Hacker's Weapons / A collection of cool tools used by Web hackers. Happy hacking , Happy bug-hunting

⚔️ Web Hacker's Weapons / A collection of cool tools used by Web hackers. Happy hacking , Happy bug-hunting

A collection of cool tools used by Web hackers. Happy hacking , Happy bug-hunting Family project Table of Contents WHW-Tools Weapons Awesome Bookmarkl

Jan 5, 2023

A curated list of awesome Kubernetes tools and resources.

Awesome Kubernetes Resources A curated list of awesome Kubernetes tools and resources. Inspired by awesome list and donnemartin/awesome-aws. The Fiery

Jan 2, 2023

Hermit manages isolated, self-bootstrapping sets of tools in software projects.

Hermit - uniform tooling for Linux and Mac Hermit installs tools for software projects in self-contained, isolated sets, so your team, your contributo

Jan 3, 2023

registry-tools: Prints image digest from a registry

registry-tools: Prints image digest from a registry

Dec 23, 2021

A set of tools for managing projects in github

Github-pm-groomer The goal of this project is to have a CLI which runs a set of different grooming stuff on github. Some features Normalize labels à l

Jan 5, 2022

CLI based tools to find the secrets in docker Images

CLI based tools to find the secrets in docker Images

docker-secrets CLI based tools to find the secrets in docker Images This tool use detect-secrets to find the secrets in the docker Image file system P

Mar 22, 2022

Measure the overheads of various observability tools, especially profilers.

strong: WIP - NOT READY TO LOOK AT go-observability-bench Terminology Workload: A Go function performing a small task ( 100ms) like parsing a big blo

Apr 23, 2022
A kafka command line browser
A kafka command line browser

kcli Kcli is a kafka read only command line browser. Install Binaries are provided here (windows is not tested). If you have go (1.11 or greater) inst

Nov 17, 2022
Flexible HTTP command line stress tester for websites and web services
Flexible HTTP command line stress tester for websites and web services

Pewpew Pewpew is a flexible command line HTTP stress tester. Unlike other stress testers, it can hit multiple targets with multiple configurations, si

Dec 27, 2022
Command Line Interface for Scaleway
Command Line Interface for Scaleway

Scaleway CLI (v2) Scaleway CLI is a tool to help you pilot your Scaleway infrastructure directly from your terminal. Installation With a Package Manag

Jan 3, 2023
Command-line tool to remotely execute commands on Windows machines through WinRM

winrm-cli This is a Go command-line executable to execute remote commands on Windows machines through the use of WinRM/WinRS. Note: this tool doesn't

Dec 15, 2022
A command line tool for validating Kubernetes configs with rego

ccheck ccheck is a command line application for writing tests against configuration files and data using the rego query language. It's intended purpos

Nov 16, 2022
Kubesecret is a command-line tool that prints secrets and configmaps data of a kubernetes cluster.

Kubesecret Kubesecret is a command-line tool that prints secrets and configmaps data of a kubernetes cluster. kubesecret -h for help pages. Install go

May 3, 2022
Command kube-tmux prints Kubernetes context and namespace to tmux status line.

kube-tmux Command kube-tmux prints Kubernetes context and namespace to tmux status line.

Sep 10, 2021
This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances

Session Manager Plugin This plugin helps you to use the AWS Command Line Interface (AWS CLI) to start and end sessions to your managed instances. Sess

Dec 28, 2022
🏯 Monitor your (gitlab/github) CI/CD pipelines via command line interface with fortress
🏯 Monitor your (gitlab/github) CI/CD pipelines via command line interface with fortress

__ _ / _| | | | |_ ___ _ __| |_ _ __ ___ ___ ___ | _/ _ \| '__| __| '__/ _ \/ __/ _

Mar 31, 2022
An unofficial command line utility for Futbin

futbin An unofficial command line utility for futbin. Also, it can be used as a library. Install Pre-compiled executables Get them here. Source You ne

Dec 29, 2022