heyTimApple

heyTimApple

little command line tools

Hello, I am just learning Elixir as a first language. I have done beginning tuts on F#, Clojure, Python, Rust, and Ruby before I stopped here.

I want to make a little command line tool that backs up a local config file to github occasionally. Is this something Elixir could be used to build? If so, could someone point me in the direction of places to look to learn to make this happen? I should mention the tool would be for windows.

I’m currently taking the The Complete Elixir and Phoenix Bootcamp and I’m early in but it so far, it’s a lot of playing with lists and manipulating them. Don’t know when it will get into other stuff and wanted to make this thing happen sooner than later.

Cheers!

Most Liked

astery

astery

Hi @heyTimApple . Read about building escript in elixir for small cli tool - Executables · Elixir School. And take a look at &System.cmd/3 function to run git.
Also as you working under windows, beware that all commands you want to run, should be in your PATH (e.g. git executable)

kokolegorille

kokolegorille

Hello and welcome,

Elixir needs to load the vm, which might not fit a command line tool.
You might still do it, but for this I would pick Rust.

strzibny

strzibny

If you want a small program that is run with Cron, Rust might be a better choice. That said if you want a long running little daemon (like a service), Elixir would be a good fit.

(Not that you cannot do no 1 in Elixir, you still get self contained executable and fast start up.)

Where Next?

Popular in Questions Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

Other popular topics Top

hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement