Skip to content

adrianliechti/devkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevKit

Application Template

Go, Python, Spring, ASP.NET, Angular, React, NGINX, ...

$ devkit template golang
> App Name: demo

$ ls demo           
Dockerfile    chart         go.mod        main.go       public        skaffold.yaml

Local Service Catalog

  • Databases: PostgreSQL, MariaDB, Redis, Elasticsearch, ...
  • Messaging: ActiveMQ, RabbitMQ, Kafka, ...
  • Tools: Jenkins, SonarQube, Mailpit, ...
  • Storage: MinIO, Vault, Artifactory, Nexus, ...

Create instance

$ devkit postgres create

HAPPY_MAHAVIRA (f046e1237937)

ENDPOINT        TARGET                
localhost:55095 tcp://172.17.0.5:5432

DESCRIPTION     VALUE                                                               
Database        db                                                                 
Username        postgres                                                           
Password        r02ZxXR1E5                                                         
URI             postgresql://postgres:r02ZxXR1E5@localhost:55095/db?sslmode=disable

List instances

$ devkit postgres list

happy_mahavira

Display info

$ devkit postgres info
> happy_mahavira

HAPPY_MAHAVIRA (f046e1237937)

ENDPOINT        TARGET                
localhost:55095 tcp://172.17.0.5:5432

DESCRIPTION     VALUE                                                               
Database        db                                                                 
Username        postgres                                                           
Password        r02ZxXR1E5                                                         
URI             postgresql://postgres:r02ZxXR1E5@localhost:55095/db?sslmode=disable

Follow logs

$ devkit postgres logs
> happy_mahavira

2024-07-14 12:09:29.661 UTC [1] LOG:  database system is ready to accept connections

Start connected client

$ devkit postgres cli
> happy_mahavira

psql (16.3 (Debian 16.3-1.pgdg120+1))
Type "help" for help.

db=#

Open shell

$ devkit postgres shell
> happy_mahavira

root@f046e1237937:/#

Delete instance

$ devkit postgres delete
> happy_mahavira

Analze Repository

Static Analysis (using Semgrep)

$ devkit sast

Vulnerability Scanning (using Trivy)

$ devkit scan

Lines of Code (using cloc)

$ devkit cloc

List big blobs

$ devkit git blobs

Find leaks (using Gitleaks)

$ devkit git leaks

Delete file in history

$ devkit git purge /path/to/file1 /path/to/file2

Analyze Images

Inspect (using Whaler)

$ devkit image inspect --image ubuntu

Dockerfile Linting (using Dockle)

$ devkit image lint --image ubuntu

Vulnerability Scanning (using Trivy)

$ devkit image scan --image ubuntu

Show Bill of Material (using Syft)

$ devkit image bom --image ubuntu

TUI Browser (using Dive)

$ devkit image browse --image ubuntu

Utilities

Local Web IDE

$ devkit code
> default

NAME    VALUE                 
URL     http://localhost:3000

Forward /Users/User/Projects to /workspace

Local Web Server

Simple File Server with CORS and optional SPA support

$ devkit server [--port 3000] [--spa] [--index index.html]

Local Proxy

Test your application for proxy support

$ devkit proxy [--port 3128] [--user username] [--password password]

Install

Requirements

MacOS / Linux

Homebrew

brew install adrianliechti/tap/devkit

Windows

Scoop

scoop bucket add adrianliechti https://github.com/adrianliechti/scoop-bucket
scoop install adrianliechti/devkit