khusnetdinov / Loki
Licence: mit
📝 Loki is library that includes helpers for building powerful interactive command line applications, tasks, modules.
Stars: ✭ 71
Programming Languages
elixir
2628 projects
Labels
Projects that are alternatives of or similar to Loki
Godello
Trello inspired kanban board made with the Godot Engine and GDScript, powered by an online real-time collaborative backend (Elixir and Phoenix Channels)
Stars: ✭ 273 (+284.51%)
Mutual labels: elixir-phoenix
Thesis Phoenix
A lightweight, bolt-on, intuitive content editing system for Elixir/Phoenix websites. Star this repo and follow along with our progress!
Stars: ✭ 645 (+808.45%)
Mutual labels: elixir-phoenix
Elixirconf 2018
A collection of links that cover what happened during ElixirConf 2018 🐥 🔥. Please feel free to submit a PR!
Stars: ✭ 56 (-21.13%)
Mutual labels: elixir-phoenix
Alloy ci
Continuous Integration, Deployment, and Delivery coordinator, written in Elixir.
Stars: ✭ 274 (+285.92%)
Mutual labels: elixir-phoenix
Elixir Phoenix Realworld Example App
Exemplary real world application built with Elixir + Phoenix
Stars: ✭ 764 (+976.06%)
Mutual labels: elixir-phoenix
Shorten api tutorial
🔗How to make a link shortener using Elixir, Phoenix and Mnesia
Stars: ✭ 60 (-15.49%)
Mutual labels: elixir-phoenix
Elixir Boilerplate
⚗ The stable base upon which we build our Elixir projects at Mirego.
Stars: ✭ 627 (+783.1%)
Mutual labels: elixir-phoenix
Awesome Phoenix
🔥 Collection of awesome open-source apps made with Phoenix Framework
Stars: ✭ 481 (+577.46%)
Mutual labels: elixir-phoenix
Drab
Remote controlled frontend framework for Phoenix.
Stars: ✭ 833 (+1073.24%)
Mutual labels: elixir-phoenix
Phoenix Ecto Append Only Log Example
📝 A step-by-step example/tutorial showing how to build a Phoenix (Elixir) App where all data is immutable (append only). Precursor to Blockchain, IPFS or Solid!
Stars: ✭ 58 (-18.31%)
Mutual labels: elixir-phoenix
WhatChat
A web chat application clone of Whatsapp web using Elixir / Phoenix, VueJs and PostgreSQL.
Stars: ✭ 32 (-54.93%)
Mutual labels: elixir-phoenix
Accent
The first developer-oriented translation tool. True asynchronous flow between translators and your team.
Stars: ✭ 721 (+915.49%)
Mutual labels: elixir-phoenix
Phoenix In Action
Code snippets and examples from the book Phoenix in Action from Manning and Geoffrey Lessel
Stars: ✭ 60 (-15.49%)
Mutual labels: elixir-phoenix
Cog
Bringing the power of the command line to chat
Stars: ✭ 910 (+1181.69%)
Mutual labels: elixir-phoenix
Loki
Loki is a toolkit for building powerful command-line interfaces.
Example
Instalation
Add loki
to your list of dependencies in mix.exs
:
def deps do
[{:loki, "~> 1.2.2"}]
end
Usage
Import all or desired module to scope:
defmodule Project do
# Import all modules
use Loki
# Or import single modules
import Loki.Shell
import Loki.Cmd
import Loki.Directory
import Loki.File
import Loki.FileManipulation
...
end
Modules
Loki.Shell
Helpers for interaction with user and printing message to shell.
-
ask/2
- Ask user input with given message. Returns tuple with parsed options. -
yes?/1
- Ask about positive user input with given message. -
no?/1
- Ask about negative user input with given message. -
say/1
- Printing message to shell. -
say_create/1
- Printing message about create file to shell. -
say_force/1
- Printing message about force action to shell. -
say_identical/1
- Printing message about identical files content to shell. -
say_skip/1
- Printing message about skipping action to shell. -
say_error/1
- Printing message about to shell. -
say_conflict/1
- Printing message about conflict to shell. -
say_exists/1
- Printing message about existance to shell. -
say_rename/2
- Printing message about rename files to shell. -
say_copy/2
- Printing message about copy files to shell. -
say_remove/1
- Printing message about removing file to shell.
Loki.Cmd
Executing terminal commands helpers.
-
execute/1
- Execute shell command with Env variables as options. -
execute_in_path/2
- Execute shell command with Env variables as options in given path. -
format_output/1
- Format execution output for reading in shell.
Loki.Directory
Working with folders helpers.
-
create_directory/1
- Helper for create directory. -
exists_directory?/1
- Helper for checking if file exists. -
copy_directory/2
- Helper for copy directory. -
remove_directory/1
- Helper for remove directory.
Loki.File
Helpers for working with file.
-
create_file/1
- Helper for create file. -
create_file_force/1
- Helper for create file in force mode. -
exists_file?/1
- Helper check if file exists. -
identical_file?/2
- Helper check if file identical. -
copy_file/2
- Helper for copy files. -
create_link/2
- Helper for create link. -
remove_file/1
- Helper for remove file. -
rename/2
- Helper for rename files and dirs.
Loki.FileManipulation
Helpers for content manipulation injecting, appending, and other.
-
append_to_file/2
- Helper appends lines to file. -
prepend_to_file/2
- Helper prepends lines to file. -
remove_from_file/2
- Helper removes lines from file. -
inject_into_file/3
- Helper injecting lines to file withbefore
andafter
options. -
replace_in_file/3
- Helper replaces lines in file. -
comment_in_file/2
- Helper comments line in file. -
uncomment_in_file/2
- Helper uncomments lines in file. -
remove_comments_in_file
- Helper removes all comments in file.
Documentation
Contribution
Clone repo, implement additional helpers, write tests and PR welcome!
License
The gem is available as open source under the terms of the MIT License.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].